Last post Sep 07, 2009 09:05 PM by email@example.com
Sep 06, 2009 11:25 AM|Aphalin|LINK
I have windows server 2008, and local comuter running vista - both have IIS7 and default configuration, is there a possobility to send an email via ASP.NET webpage? All websiites are saying it is super easy but i always get stuck with SMTP Server, as my
attempts to coonect to it fails "cannot connest to SMTP server". In IIS Manager i see SMTP Server at the end of the upper row, and it seems running...
all codes like
context.Response.ContentType = "text/plain";
MailMessage mail = new MailMessage();
mail.To = "firstname.lastname@example.org";
mail.From = "email@example.com";
mail.Subject = "a";
mail.Body = "b";
SmtpMail.SmtpServer = "localhost";
Cannot connect to Smtp on the last line. Am i suppose to write not localhost? But then what and how do i find this out, or am i suppose to install something on my server?
Sep 06, 2009 12:00 PM|docluv|LINK
Do you have an SMTP server setup on your local machine? Most likely no. You need to find the address of the SMTP server you can send e-mail through. This is a very common mistake .NET developers make.
I have written several articles on sending e-mail in .NET. If you just need to test the functionality read the last two I wrote about Neptune and of course download it to test against.
Sep 07, 2009 09:05 PMfirstname.lastname@example.org|LINK