View Single Post
  #8 (permalink)  
Old April 17th, 2010, 09:19 AM
banditonehundred banditonehundred is offline
Registered User
Join Date: Apr 2010
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Argh...I must be doing something wrong...

Imar, I followed your link and added the following code to my website

Here's my code in Email.aspx

{public partial class Email : BasePage

protected void Page_Load(object sender, EventArgs e)
MailMessage myMessage = new MailMessage();
myMessage.Subject = "Test Message";
myMessage.Body = "Hello world, from PlanetWrox";

myMessage.From = new MailAddress("", "My Name");
myMessage.To.Add(new MailAddress(""", "My Name"));

SmtpClient mySmptClient = new SmtpClient();
mySmptClient.EnableSsl = true;
I added this code to web.config...

<smtp deliveryMethod="Network" from="">

I still get the following error...

System.Net.Mail.SmtpException: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required.
Reply With Quote