-2

I want to know if this code is correct:

<system.net>
    <mailSettings>
        <smtp>        
            <network host="smtp.gmail.com" port="587" userName="adm@mail.com" password="123" />        
        </smtp>
    </mailSettings>
</system.net>
Tomas Vinter
  • 2,690
  • 8
  • 36
  • 45
Lews
  • 1
  • 1
  • Your question doesn't seem to have anything to do with the title. What is it you want to know? – Blumer Oct 11 '12 at 22:11
  • I want to know about a free package in umbraco to send email, it is for my contact us from my website, also how configure in the web.config. Thanks for respond my question – Lews Oct 11 '12 at 22:22
  • The question has nothing to do with the title. Furthermore, the question is poorly describes, and it does not contain any research effort. – Tomas Vinter Jan 15 '13 at 09:18
  • Neither does it have anything to do with razor. – Tomas Vinter Jan 15 '13 at 09:19
  • Furthermore, it is advicable to have one question per question, especially if the question does not have anything to do with the title. Ask separate question on how to configure smtp in asp.net. – Tomas Vinter Jan 15 '13 at 09:23

1 Answers1

0

I'm not familiar with Umbraco - that said, if you have tried using the .config settings that you specified in your original question and the email is not successfully sending to the recipient, try updating your settings like the following:

<smtp deliveryMethod="Network">
      <network enableSsl="true" host="smtp.gmail.com" 
         defaultCredentials="false" port="587" userName="xx@gmail.com" password="xx"/>
</smtp>

If you continue to not receive emails from your application, try logging into your Gmail account (the same account that you specified in your .config smtp setting) and see if you have an email from the Gmail team that is asking you to confirm whether or not Umbraco is an authorized relay for sending email (for more info on this, see this SO answer).

Community
  • 1
  • 1
Jed
  • 10,649
  • 19
  • 81
  • 125