VB.NET
Dim mail As New MailMessage()
mail.To = '[email protected]'
mail.From = '[email protected]'
mail.Subject = 'Test.'
mail.BodyFormat = MailFormat.Html
mail.Body = 'Test Message'
SmtpMail.SmtpServer = 'localhost' ’your real server goes here
SmtpMail.Send(mail)
C#
MailMessage mail = new MailMessage();
mail.To = '[email protected]';
mail.From = '[email protected]';
mail.Subject = 'Test.';
mail.BodyFormat = MailFormat.Html;
mail.Body = 'Test Message';
SmtpMail.SmtpServer = 'localhost'; //your real server goes here
SmtpMail.Send( mail );
Share with