View Single Post
  #2 (permalink)  
Old March 31st, 2011, 12:13 PM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi Fred,

Quote:
But if I try to just write to my c drive why would I need schemas. I cannot even write to my c drive.
You don't need schemas to make this work. However, you do need to create the folder c:\maildrop up front as explained in the book. Can you confirm the folder exists?

If I create that folder and then use your code as-is, I get a message in the maildrop folder.

For Gmail, you also need to specify a portnumber. Something like this will probably work:

<network enableSsl="true" host="smtp.gmail.com" password="YourPassword"
userName="YourAccountName@gmail.com" port="587" />

If it still doesn't work, make sure you don't have Anti Virus software or other software blocking the outgoing mail.

If you still can't make it work, please post the error message you're seeing.

Cheers,

Imar

BTW: you may want to remove your Gmail password in the post, and change the From address in your web.config so I don't have to deal with your bounce messages.... ;-)
__________________
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