Knowledgebase: Script Mail
Sending E-Mail using ASP.Net (C# Example)
Posted by Paul Woodland on 30 September 2012 04:24 AM
|
|
If you are sending mail through ASP.Net on your website, you must use SMTP authentication through our Script Mail service, of which details can be found here: ASP.Net includes built-in support for sending using SMTP authentication, no third party components are needed. The auth details can be set in web.config if you do not wish to include them in your code.
Example of sending email through ASP.Net using C#:
// Create the mail message MailMessage mail = new MailMessage(); // Set the from address and to address mail.From = new MailAddress("test@yourwebservers.com"); mail.To.Add("test@yourwebservers.com"); // Set the subject and body mail.Subject = "Test Message"; mail.Body = "This is a test"; | |
|
Comments (0)