public void Send(MailMessage message)
{
try
{
// This implementation dumps the message to the filesystem
var client = new SmtpClient
{
DeliveryMethod = SmtpDeliveryMethod.SpecifiedPickupDirectory,
PickupDirectoryLocation = StateManager.Settings["MailDumpLocation"].ToString()
};
client.Send(message);
}
catch (Exception ex)
{
LogManager.Log(ex);
ValidationManager.AddError("Mail.Failed");
}
}