Live Chat Icon For mobile
Live Chat Icon

How to send simple text mail in ASP.NET

Platform: ASP.NET| Category: Mail


Dim mail As New MailMessage()
mail.To = ''
mail.From = ''
mail.Subject = 'Test.'
mail.Body = 'Test Message'
SmtpMail.SmtpServer = 'localhost' ’your real server goes here


MailMessage mail = new MailMessage();
mail.To = '';
mail.From = '';
mail.Subject = 'Test.';
mail.Body = 'Test Message';
SmtpMail.SmtpServer = 'localhost';  //your real server goes here
SmtpMail.Send( mail );

Share with

Share on twitter
Share on facebook
Share on linkedin

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.