View Single Post
  #4 (permalink)  
Old April 16th, 2010, 02:31 AM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 72,022, Level: 100
Points: 72,022, Level: 100 Points: 72,022, Level: 100 Points: 72,022, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,076
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi there,

Take another look at step 4 on page 320 and at the Common Mistakes box at the bottom of the page. You left out the enableSsl attribute which Gmail requires. Also, try port 587 instead of 465. This works for me:

Code:
 
<system.net>
  <mailSettings>
    <smtp deliveryMethod="Network">
      <network host="smtp.gmail.com" userName="User" password="Password" port="587" enableSsl="true" />
    </smtp>
  </mailSettings>
</system.net>
Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote