this.AddLogEntry("Creating templater.");
// We create the templater objet.
ActiveUp.Net.Mail.Templater templater = new Templater(@"MailFormat.xml");
this.AddLogEntry("Sending template message.");
try
{
string smtp = string.Empty;
if (_cbUseSmtpFromTemplate.Checked)
{
smtp = templater.SmtpServers[0].Host;
}
else
{
smtp = smtpServerAddressTextbox.Text;
}
templater.Message.Send(smtp);
this.AddLogEntry("Message sent successfully.");
}
catch (SmtpException ex)
{
this.AddLogEntry(string.Format("Smtp Error: {0}", ex.Message));
}
catch (Exception ex)
{
this.AddLogEntry(string.Format("Failed: {0}", ex.Message));
}