Copied to clipboard

Flag this post as spam?

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


  • Mark Watson 118 posts 384 karma points
    Sep 05, 2019 @ 02:46
    Mark Watson
    0

    form workflow not sending email

    I have tried several ways to set this up but it does not send emails

    I am using the following in the config

    <mailSettings>
    
            <smtp from="[email protected]">
                <network host="mail.worldsecureemail.com" port="465" userName="[email protected]" password="secret" />
            </smtp>
    
    </mailSettings>
    

    The health check is fine SMTP settings are configured correctly and the service is operating as expected.

    I receive an entry in the form file.

    The workflow is set up enter image description here

    Anyone with any ideas what i can try to make this work?

  • Shaishav Karnani from digitallymedia.com 354 posts 1638 karma points
    Sep 05, 2019 @ 03:33
    Shaishav Karnani from digitallymedia.com
    0

    Hi Mark,

    Please can you try below options:-

    1) You might need to add enableSsl="true" in the smtp/network node of web.config.

    2) Check the log if email is failing

    3) Try sending test email from your own controller and put it in try catch to see if email is successfully going or failing due to any specific reason.

    Please let me know how it goes?

    Regards, Shaishav

  • Mark Watson 118 posts 384 karma points
    Sep 05, 2019 @ 06:19
    Mark Watson
    0

    Thanks Shaishav

    I am new to umbraco so not sure how to do all the points.

    1) Could not find this in the web.config file. Where do I find these settings?

    2) Yes, the email failed System.Net.Mail.SmtpException: Failure sending mail. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host

    3) Do not know how to do this.

  • Shaishav Karnani from digitallymedia.com 354 posts 1638 karma points
    Sep 05, 2019 @ 06:35
    Shaishav Karnani from digitallymedia.com
    1

    Hi Mark,

    Please can you update config with enableSsl="true" and try,

    <smtp from="[email protected]">
                <network host="mail.worldsecureemail.com" port="465" userName="[email protected]" password="secret" enableSsl="true"/>
            </smtp>
    

    Error from log suggest that your SMTP is not setup correctly causing the issue.

    Regards,

    Shaishav

  • Mark Watson 118 posts 384 karma points
    Sep 05, 2019 @ 06:52
    Mark Watson
    0

    Thanks Shaishav

    I updated the config file.

    Health checked the connection SMTP settings are configured correctly and the service is operating as expected.

    Error System.Net.Mail.SmtpException: Failure sending mail. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host

    It may be this particular email provider. Is that a possibility?

  • Shaishav Karnani from digitallymedia.com 354 posts 1638 karma points
    Sep 05, 2019 @ 06:59
    Shaishav Karnani from digitallymedia.com
    0

    Hi Mark,

    Yes it is possible. Try adding below code when project is started

    System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
    

    You can refer this link:- https://our.umbraco.com/Documentation/Reference/Events/Application-Startup-v7 and add code in ApplicationStarted.

    namespace MyProject.EventHandlers
    {
        public class RegisterEvents : ApplicationEventHandler
        {
            protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
            {
                //Listen for when content is being saved
        System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
    
            }
         }
    }
    

    Regards,

    Shaishav

  • Mark Watson 118 posts 384 karma points
    Sep 06, 2019 @ 02:16
    Mark Watson
    0

    Thanks Shaishav

    We tested another email account and it worked without your new code option. It seems worldsecureemail.com blocks anyone trying to use it

  • Shaishav Karnani from digitallymedia.com 354 posts 1638 karma points
    Sep 06, 2019 @ 03:48
    Shaishav Karnani from digitallymedia.com
    0

    Nice Mark! - lets close this issue.

    Have a nice weekend.

    Cheers,

    Shaishav

Please Sign in or register to post replies

Write your reply to:

Draft