Hi Imar,
Great book and am using for my final year project.
I am badly stuck! and My head is spinning Now
Couldn't make the send email thing work getting an error
"......... The server response was: 5.7.0 Must issue a STARTTLS command first"
Line 25:
Line 26: SmtpClient mySmtpClient = new SmtpClient();
Line 27: mySmtpClient.Send(myMessage);
Line 28: mySmtpClient.EnableSsl = true;
Line 29:
******************
My Email.aspx as follows:
******************
MailMessage myMessage = new MailMessage();
myMessage.Subject = "Test Message";
myMessage.Body = "Hello world, from Planet Wrox";
myMessage.From = new MailAddress("
[email protected]", "Waqas");
myMessage.To.Add(new MailAddress("
[email protected]", " SendToWaqas"));
SmtpClient mySmtpClient = new SmtpClient();
mySmtpClient.Send(myMessage);
mySmtpClient.EnableSsl = true;
********************
And web.config as follows:
********************
<system.net>
<mailSettings>
<smtp deliveryMethod="Network" from="Waqqas Basit <
[email protected]>">
<network host="smtp.live.com" userName="
[email protected]" password= "xyxyxyx" port="25" />
</smtp>
</mailSettings>
</system.net>
__________________________________________________ _____________________________________
Please help as it's the 2nd day since i am in front of the computer with result = 0 and have tried my different email accounts with different smtp servers.
Any help much apprecited
Regards
Waqas