public void AddAttachment(string fileName, byte[] data, string mimeType, string contentId) { var emailAttachment = new EmailAttachment(fileName, data, mimeType, true); emailAttachment.ContentID = contentId; Attachments.Add(emailAttachment); }
public string AddAttachment(string fileName, byte[] data, string mimeType, bool isInline = false) { var emailAttachment = new EmailAttachment(fileName, data, mimeType, isInline); Attachments.Add(emailAttachment); return(emailAttachment.ContentID); }