Copied to clipboard

Flag this post as spam?

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


  • Ivan 139 posts 302 karma points
    Mar 08, 2011 @ 12:11
    Ivan
    0

    Need help to config mail settings

    Hi.

    I am trying to config my google apps mail domain in web.config file but i can't get it to work. My file reads:

     

      <system.net>
        <mailSettings>
          <smtp from="[email protected]" deliveryMethod="Network">
          <network defaultCredentials="false" host="smtp.gmail.com" port="465" userName="[email protected]" password="xxxx" />
          </smtp>
        </mailSettings>
      </system.net>

    What am i doing wrong?

    Thanks in advance for your work!

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Mar 08, 2011 @ 12:21
    Jan Skovgaard
    0

    Hi Ivan

    Do you get some kind of error when sending an e-mail? (You should be able to see these in the log manager if you have the log manager package installed).

    Have you tried to use port 587 instead of 465?

    /Jan

  • Ivan 139 posts 302 karma points
    Mar 08, 2011 @ 12:25
    Ivan
    0

    I will give it a try.

    Thanks Jan.

  • Ivan 139 posts 302 karma points
    Mar 08, 2011 @ 12:33
    Ivan
    0

    Hi again Jan.

    Entry log: System.Net.Mail.SmtpException: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first.

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Mar 08, 2011 @ 12:34
    Jan Skovgaard
    0

    And was this error occuring when the port was set to 587 or 465?

    /Jan

  • Ivan 139 posts 302 karma points
    Mar 08, 2011 @ 12:42
    Ivan
    0

    Both

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Mar 08, 2011 @ 12:48
    Jan Skovgaard
    0

    Have a look at this post's 1. suggestion: http://www.google.com/support/forum/p/Google%20Apps/thread?tid=396e53acd0030ef4&hl=en

    Does this help?

    /Jan

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Mar 08, 2011 @ 12:50
    Jan Skovgaard
    0

    Hi again

    Just come to think about it...don't think this will help...Something tells me you need to make another extension based on the umbraco.library:SendMail() extension, which takes one more parameter to allow for SSL...

    I think it was Pinal Bhatt in here who did this and posted the solution - however I must admit I can't remember the title of the post but try searching for it in here. I will let you know if I find it.

    /Jan

  • Ivan 139 posts 302 karma points
    Mar 08, 2011 @ 13:08
    Ivan
    0

    No way. I enabled SSL in my domain and tried again refreshing IIS with ports 587 and 465. The first still gives STARTTLS error and the second times out.

    Do you know any other thing i can try to make it work?

    __________________________________________________________________________________________________________________________

    UPDATE!
    Finally I used information in this post to solve the problem:

    http://our.umbraco.org/projects/website-utilities/cultiv-legacy-contact-form-%28pre-47!%29/requests-and-questions/2662-How-to-relay-mail-through-Gmail

  • Jack Lawry 23 posts 146 karma points c-trib
    Jan 18, 2018 @ 12:03
    Jack Lawry
    0

    Ivan are you able to advise on the fix as that article is not available anymore.

  • Nik 1593 posts 7151 karma points MVP 6x c-trib
    Jan 18, 2018 @ 12:34
    Nik
    0

    Hi Jack,

    I believe google made various changes. I've only ever been able to get it to work with the following configuration:

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

    The From address and the username have to match, you can't use Gmail as a relay for an alternative email address and the port has to be 587 and SSL true.

    Cheers,

    Nik

  • Ivan 139 posts 302 karma points
    Jan 18, 2018 @ 15:56
    Ivan
    0

    Hi Jack,

    As Nick suggests web.config configuration should be similar to what he points.

    It's possible that Google blocks any email you try to send from the server where website is hosted. In that case, you should receive an email notifying of attempted unauthorized account access. Just follow email instructions to mark the server as a trusted device/machine. That should do the trick.

    Best, Ivan

Please Sign in or register to post replies

Write your reply to:

Draft