Ejemplo n.º 1
0
 public void AttachFile(string fileName)
 {
     FileAttachments.Add(fileName);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Creates a new mail merge message.
 /// </summary>
 /// <param name="subject">Mail message subject.</param>
 /// <param name="plainText">Plain text part of the mail message.</param>
 /// <param name="htmlText">HTML message part of the mail message.</param>
 /// <param name="fileAtt">File attachments of the mail message.</param>
 public MailMergeMessage(string subject, string plainText, string htmlText, IEnumerable <FileAttachment> fileAtt)
     : this(subject, plainText, htmlText)
 {
     fileAtt.ToList().ForEach(fa => FileAttachments.Add(fa));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Add a file attachment that will be attached to the PDF file.
 /// </summary>
 /// <param name="attachment">The file attachment as a byte array.</param>
 /// <param name="fileName">The filename of the file attachment.</param>
 /// <param name="description">The description of the file attachment.</param>
 public void AddFileAttachment(byte[] attachment, string fileName, string description)
 {
     _resources.Add(attachment);
     FileAttachments.Add(new FileAttachment(
                             "job-resource:" + (_resources.Count - 1), fileName, description));
 }