static class QuickMail
{
public static void SendMail(string from, string to, string subject, string messageText, bool isHtml)
{
SmtpClient mymail = new SmtpClient(ConfigurationManager.AppSettings["localsmtp"]);
MailMessage message = new MailMessage(from, to, subject, messageText);
message.IsBodyHtml = isHtml;
mymail.Send(message);
}
}
Never been to CodeSnippets before?
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)
Quick Mail class (See related posts)
You need to create an account or log in to post comments to this site.
Related Posts
» Authenticated SMTP in C# in mail smtp .net csharp
» Changing your hostname which... in exim mail smtp
» exim router for relaying via... in sysadmin freebsd exim mail smarthost
» csharp app.path in csharp
» Find flagged message subject... in find shell mail maildir flagged messages
» Populating a Winforms ComboB... in .net csharp
Snippets (source code soon to be available) developed by Peter Cooper and powered by Ruby On Rails