Copied to clipboard

Flag this post as spam?

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


  • Usman 8 posts 78 karma points
    Jul 24, 2017 @ 05:12
    Usman
    0

    How to send and recieve emails in Umbraco 7.6 Starter Kit

    I am learning Umbraco from this starter kit and stuck on how to send emails if I am using third party email hosting services(zoho)?

    Steps taken so far:

    Installed forms in Umbraco
    Set the workflow to send email ([email protected])
    Set the notification email = [email protected] in /config/umbracosettings.config

    lastly, Changed the smtp setting in webconfig and as per instruction from zoho to:

        <mailSettings>
            <smtp from="[email protected]">
                <network host="smtp.zoho.com" port="465" enableSsl="true" defaultCredentials="false" userName="[email protected]"  password="xx" />
            </smtp>
        </mailSettings>
    

    Log file:

    2017-07-24 06:27:48,460 [P37892/D12/T8] ERROR Umbraco.Forms.Core.Providers.WorkflowTypes.SendEmail - There was a problem sending an email to '[email protected]' from Workflow for Form 'Contact Form' with id 'adf160f1-39f5-44c0-b01d-9e2da32bf093' for Record with unique id '04328ee4-573b-4db6-a827-47a0581aa2cb' System.Net.Mail.SmtpException: The operation has timed out. at System.Net.Mail.SmtpClient.Send(MailMessage message) at Umbraco.Forms.Core.Providers.WorkflowTypes.SendEmail.Execute(Record record, RecordEventArgs e) 2017-07-24 06:27:48,553 [P37892/D12/T8] INFO Umbraco.Web.Mvc.UmbracoPageResult - Executing Umbraco RouteDefinition controller 2017-07-24 06:27:48,710 [P37892/D12/T8] INFO Umbraco.Web.Mvc.UmbracoPageResult - Finished (took 158ms)

    Could somone pin point where is the mistake?

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Jul 24, 2017 @ 07:09
    Dennis Aaen
    0

    Hi Usman,

    Sorry to hear that you have issues with sending emails when you are using Umbraco Forms.

    If you have the project running on your local machine, then I would recommend you to try using this lille smart tool called smtp4dev

    https://smtp4dev.codeplex.com

    With this tool you can test if you get a copy of the email, on your local machine.

    If you are getting the email on your local machine when you are trying submit the form.

    Then you know that there must be something with the SMTP settings in the web.config.

    Hope this helps,

    /Dennis

  • Usman 8 posts 78 karma points
    Jul 25, 2017 @ 01:41
    Usman
    0

    smtp4dev only enable me to do testing on localhost, but I am having problem while using third party email hosting (zoho) on server so testing with smtp4dev won't work in my case.

    I used smtp setting from this thread for gmail on my server and it is working, nevertheless, when I try third party email hosting (zoho) Umbraco does not send email. and I am getting same error in log file I am using following smtp settings please review and recommend what is missing from the following smtp settings.

    <mailSettings>
        <smtp from="[email protected]">
            <network host="smtp.zoho.com" port="465" enableSsl="true" defaultCredentials="false" userName="[email protected]"  password="xx" />
        </smtp>
    </mailSettings>
    
  • Micha Somers 134 posts 597 karma points
    Jul 25, 2017 @ 07:03
    Micha Somers
    0

    First check your mailsettings to make sure the host/port/etc. are absolutely correct.

    Also check if your zoho account is configured to allow sending e-mails using the credentials you provide.

    Further, check if your hosting server allows sending e-mails using an external server. In case e-mails are being send from your domain called mydomain.com, your hosting server may consider user@mydomain.com to be a local e-mail.

    In that case, you need to make some configuration changes to make sure your hosting server uses an external server to handle your e-mail instead of trying to handle it locally. Probably the zoho help pages provide more info on this.

  • Usman 8 posts 78 karma points
    Jul 26, 2017 @ 02:14
    Usman
    0

    First check your mailsettings to make sure the host/port/etc. are absolutely correct.

    I check my mail settings from here they are ok except that username and password is not mention in this documentation and I don't think I can have access to smtp server without username and password.

    Also check if your zoho account is configured to allow sending e-mails using the credentials you provide.

    If I can send email from my zoho account does that mean I am allowed to send emails?

    Further, check if your hosting server allows sending e-mails using an external server. In case e-mails are being send from your domain called mydomain.com, your hosting server may consider [email protected] to be a local e-mail.

    when I use my gmail smtp settings like this:

    <smtp from="[email protected]">
    <network host="smtp.gmail.com" port="587" enableSsl="true" defaultCredentials="false" userName="[email protected]" password="XX"/>
    

    it works so that means hosting server allows sending e-mails using an external server.

    Please guide me if you think of any thing else after reading this

  • Micha Somers 134 posts 597 karma points
    Jul 26, 2017 @ 12:04
    Micha Somers
    1

    Hi Usman,

    The topic "Unable to receive emails from website contact forms" in the url you provided, mentions my last point.

    If the domain on the hosting server is mydomain.com, it will consider [email protected] to be an external e-mail address (gmail.com != mydomain.com).

    [email protected] on the other hand could (dependend on your hosting server settings) be handled as a local e-mail address by your hosting server.

    The forementioned topic says about that:

    You'll need to check for any Local Email Delivery configuration and switch off the WebHost's local setting.

    I cannot exclude other causes, but since gmail is working and you can use the same settings to connect from a local machine, it probably is the above reason or a particular thing on the hostingserver that prevents sending e-mails for Zoho (eg not allowing to connect via ssl to port 465 on that server)

    In that case, it would also be interesting to see if you can connect using Port=587 and also try to set (temporarily) enableSsl=false.

    Further, I am not sure where your server is located. For Europe, the smtp server seems to be: smtp.zoho.eu

    Hope I have given you some hints to help you further...

    Best regards,

    Micha

  • Usman 8 posts 78 karma points
    Jul 27, 2017 @ 19:36
    Usman
    0

    Thanks Somers, the problem is still present, and the problem won't solve unless hosting provider fix things from their end. I pinned down the issue and found www.smarterasp.net hosting free trial for hosting is configured in such a way that it creates Email delivery issues for local emails.

    And I found this problem because you shared your precious knowledge with me and I learnt from you :)

Please Sign in or register to post replies

Write your reply to:

Draft