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 82 posts 251 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;
    
  • milkman matty 16 posts 97 karma points
    Apr 03, 2019 @ 08:44
    milkman 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="account@website.com.au">
            <network host="smtp.office365.com" userName="account@website.com.au" 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 1 post 71 karma points
    5 days ago
    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!

Please Sign in or register to post replies

Write your reply to:

Draft