I’m having windows vista and I checked that it does not have default virtual smtp in its IIS.
I used the local host with port 25 to send emails for my password recovery control but it is not working.
How can I send the email?
I got it working now. Here is my code:
PasswordRecovery1_SendingMail(object sender, MailMessageEventArgs e)
{
e.Cancel = true;
PasswordRecovery1.MailDefinition.BodyFileName = "~/password.txt";
SmtpClient smtp = new SmtpClient();
smtp.EnableSsl = true;
smtp.Send(e.Message);
}
<mailSettings>
<smtp from="email@gmail.com">
<network host="smtp.gmail.com" port="587" userName="email@gmail.com" password="xxxxx"/> </smtp>
</mailSettings>
In password.txt file I wrote “You can return to the website by following login details. In password.txt file I wrote “You can return to the website by following login details.
<br>Username = <%Username%> </br>
<br>Password = <%password%>" </br>
With the scarce info provided … I can only guess that your development mail server is not set up correctly. If you are sending using localhost then you will need to have smtp running and configured on the local IIS server. Why did you make sure this was off?