Hi,
I'm trying out the Solution in this book chapter by chapter in my home computer and I'm stuck in Chapter 4 where we send emails using <mailDefinition> I was able to send email successfully from the contact.aspx page using the following web.config
<system.net>
<mailSettings>
<smtp deliveryMethod ="Network" from ="
[email protected]">
<network defaultCredentials="false" host="smtp.gmail.com" userName="
[email protected]" password="xxx" port="587"/>
</smtp>
</mailSettings>
</system.net>
and the following code
SmtpClient client = new SmtpClient();
client.EnableSsl = true;
client.Send(msg);
Please note I had to add
client.EnableSsl = true;
But the Register.aspx and PasswordRecovery.aspx page gives the following error :(
"The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first. i12sm10525493wxd.4 "
Kindly help me resolve this error.