Never been to TextSnippets 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!)

About this user

Sean Harvell sean.harvell.ws

« Newer Snippets
Older Snippets »
2 total  XML / RSS feed 

csharp app.path

// csharp app.path

public static string AppPath()
{return AppDomain.CurrentDomain.BaseDirectory;}

Quick Mail class

// Quick Mail class

    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);
        }
    }
« Newer Snippets
Older Snippets »
2 total  XML / RSS feed