I am trying to send a confirmation mail after a user has registered on my website. I am using Webmatrix and ASP.NET to implement this.
I followed the code on this website http://www.asp.net/web-pages/tutorials/email-and-search/11-adding-email-to-your-web-site
For creating the SMTP server i used the IIS manager in Windows 7.
But its not working.
I changed the settings to
WebMail.SmtpServer = "localhost";
WebMail.SmtpPort = 25;
WebMail.EnableSsl = false;
WebMail.UserName = "name";
WebMail.From = "---@gmail.com";
WebMail.Password = "pass";
What do i put as my username and password for this? I am trying to test this on localhost. I dont have a server account.
Please help
great tutorial how to do this is
Sending email in .NET through Gmail
i have used it myself.
for sure i can see one error:
WebMail.SmtpServer = “localhost”; <– is the provider you are using to send email
localhost is the PC what are you using (unless you have your own smtp server)
the link will help as its only small change you need to do and you can after investigate