Copied to clipboard

Flag this post as spam?

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


  • Ayo Adesina 430 posts 1023 karma points
    May 26, 2014 @ 21:17
    Ayo Adesina
    1

    Email not sending - library.SendMail

    I'm using this umbraco Library method to send an email via a contact form

    library.SendMail("[email protected]", "[email protected]", model.Subject, sb.ToString(), true);
    

    My web config file looks like this

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

    But the emails are not arriving...

    I am running from my local machine.

    Any ideas?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    May 26, 2014 @ 21:36
    Jan Skovgaard
    0

    Hi Ayo

    Have you checked the log file at /app_data/logs to see if it reveals any error messages when you're trying to send an e-mail? Are there any entries marked with "ERROR"?

    And I don't suppose it could be a spam folder issue?

    It might be helpful to use the FakeSmtp tool from http://nilhcem.github.io/FakeSMTP/ to see what happens?

    Hope this helps.

    /Jan

  • Ayo Adesina 430 posts 1023 karma points
    May 26, 2014 @ 23:42
    Ayo Adesina
    0

    Thanks had a look in the log file and found this

    he SMTP server requires a secure connection or the client was not authenticated.

    So I need to change my settings in the web-config to allow a secure connection.

    Do you know how?

    And in addition... that log file looks like it should be pretty useful what kind of things wind up in here?

  • Ayo Adesina 430 posts 1023 karma points
    May 26, 2014 @ 23:53
    Ayo Adesina
    101

    Thanks, I found the solution: You need to add enableSsl="true" to the nextwork tag.

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

    Its all good and working now.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    May 27, 2014 @ 08:14
    Jan Skovgaard
    0

    Hi Ayo

    Ah yes...did not notice you're using Gmail. Glad you got it working and thanks for sharing.

    Cheers, Jan

Please Sign in or register to post replies

Write your reply to:

Draft