Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Brett Spencer 88 posts 260 karma points
    Jan 29, 2019 @ 17:03
    Brett Spencer
    1

    Integrated email not working for Invite Users

    Getting error when attempting to use the email system within Umbraco:

    System.Net.Mail.SmtpException: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM [MWHPR14CA0031.namprd14.prod.outlook.com]

    1. I am using my own code to send emails for forms with no problem. I am even pulling the information directly from the same setting in the config files.

    2. I set up the web.config and umbracosettings config with the appropriate from - login - password - port settings. I am pretty sure based on the config comments that I entered the correct parameters - even switched out From parameter just to test to make sure.

    3. I found this thread that states to set the ssl in web.config to true: Problem: We are using a NetScaler to handle all port 443 calls and routing internally to the correct server/site using port 80. When I set this to true in config I get an error for "Too Many Redirects".

    How can I set this up? How can I set this if the EnableSsl is truly the issue:

        SmtpClient client = new SmtpClient(server);
    // Credentials are necessary if the server requires the client 
    // to authenticate before it will send email on the client's behalf.
    client.UseDefaultCredentials = true;
                      client.EnableSsl = true;
    
  • Matty 34 posts 148 karma points
    Apr 03, 2019 @ 08:44
    Matty
    0

    Having the same problem. Also using outlook/office365 smtp.

    I am also sending emails securely without any issues in surfaceControllers

    MailMessage mail = new MailMessage(from, to);
    SmtpClient client = new SmtpClient();
    client.Port = 587;
    client.EnableSsl = true;
    client.DeliveryMethod = SmtpDeliveryMethod.Network;
    client.UseDefaultCredentials = false;
    client.Credentials = new System.Net.NetworkCredential(from, WebConfigurationManager.AppSettings["mailPassword"]);
    client.Host = "smtp.office365.com";
    client.Send(mail);

    Unfortunately I don't know how to do this for invite emails. I just get OP's error.

    I did find that you can specify to use ssl in smtp settings ( https://stackoverflow.com/a/31356582 ) in the webconfig in addition to also setting the umbracoUseSSL property. However this did nothing.

    <system.net>
        <mailSettings>
          <smtp from="[email protected]">
            <network host="smtp.office365.com" userName="[email protected]" password='xxxxxxx' port="587" enableSsl="true" />
          </smtp>
        </mailSettings>
      </system.net>
    

    Has anyone else hit this issue? surely there's a simple answer to this.

  • Hüseyin 13 posts 103 karma points
    Dec 04, 2019 @ 06:32
    Hüseyin
    0

    Hi,

    I have the same problem in my projects. I don't know what I shloud do to fix this problem.

    Please help!

  • Mark Drake 134 posts 458 karma points c-trib
    Mar 01, 2020 @ 21:44
    Mark Drake
    0

    I have not been able to resolve SMTP issues with Office365 yet. Did anyone have luck in this thread?

  • Michael Argentini 5 posts 78 karma points
    Nov 20, 2020 @ 22:04
    Michael Argentini
    0

    Same here. We have a client using Office365 for email. Sending from controllers or anywhere else works fine. Invitations from the user system fails because the sender is not what is defined in the SMTP section of the web.config file.

  • Niels Olsen 2 posts 22 karma points
    Dec 08, 2020 @ 22:09
    Niels Olsen
    0

    Same here. On a fresh 8.9.1. My smtp settings uses SSL and work perfect on contact form I have made, but it gives a "System.Net.Mail.SmtpException: Mailbox unavailable. The server response was: 4.7.1 Authentication required" when trying to send out a new user invite.

  • Huw Reddick 1929 posts 6717 karma points MVP 2x c-trib
    Dec 09, 2020 @ 06:46
    Huw Reddick
    0

    From the earlier error it sounds like it is authenticating but does not recognise the from address as a valid mailbox for your login.

    The latest post however is indicating a credential problem logging in

  • Niels Olsen 2 posts 22 karma points
    Dec 09, 2020 @ 08:27
    Niels Olsen
    0

    Yes, it is an authentication error. And it must be caused by Umbraco not using the EnableSsl information given in the config file.

    I get same error ("4.7.1 Authentication required" ) if I set EnableSsl=false and call the smtp server from a console app.

Please Sign in or register to post replies

Write your reply to:

Draft