Skip to content

Instantly share code, notes, and snippets.

@half-ogre
Created May 24, 2012 22:46
Show Gist options
  • Save half-ogre/2784679 to your computer and use it in GitHub Desktop.
Save half-ogre/2784679 to your computer and use it in GitHub Desktop.
For Steve
var mailSenderConfiguration = new MailSenderConfiguration()
{
DeliveryMethod = SmtpDeliveryMethod.SpecifiedPickupDirectory,
PickupDirectoryLocation = "c:\\dev\\mail",
};
var mailSender = new MailSender(mailSenderConfiguration);
var mailMessage = new MailMessage
{
From = new MailAddress("[email protected]"),
Subject = "Sunrise Report",
Body = string.Format("#Sunrise Report#{1}##{0}##{1}", DateTime.Now.ToShortDateString(), Environment.NewLine),
IsBodyHtml = true
};
mailMessage.To.Add(new MailAddress("[email protected]"));
mailSender.Send(mailMessage);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment