View Single Post
  #9 (permalink)  
Old April 17th, 2010, 10:50 AM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 71,804, Level: 100
Points: 71,804, Level: 100 Points: 71,804, Level: 100 Points: 71,804, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,048
Thanks: 80
Thanked 1,581 Times in 1,558 Posts
Default

Hi there,

That's strange. I just copied your code and configuration in a new web site and it works fine for me.

A few things you could check:

1. Is this really the code that is firing? Or does your page have other (Login) controls that try to send mail on their own?

2. Are your user name and password correct?

3. Are you using the right Gmail name? You need to use myname@gmail.com; not just myname.

4. Is your network allowing you to send mail and reach port 587?

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