/// <summary>
 /// Clear all attachment of the mail
 /// </summary>
 public void ClearAttachment()
 {
     _mail.ClearAttachments();
 }
Ejemplo n.º 2
0
    private void Init()
    {
        msg = new EmailMessage(ConfigurationSettings.AppSettings["SmtpServer"]);
        msg.ClearAttachments();

        msg.FromAddress = ConfigurationSettings.AppSettings["FROMNAME"];

        msg.BodyFormat = MailFormat.Html;

        for (int i = 0; i < ConfigurationSettings.AppSettings.Count; i++)
        {
            AddBodyReplace("#WC_" + ConfigurationSettings.AppSettings.GetKey(i) + "#", "<span style='white-space:nowrap;'>" + ConfigurationSettings.AppSettings.Get(i) + "</span>");
        }
    }