Exemplo n.º 1
0
 public void AddAttachment(string filepath, string cid)
 {
     if (filepath != null)
     {
         Attachment attachment = new Attachment(filepath);
         attachment.ContentId = cid;
         Attachments.Add(attachment);
     }
 }
Exemplo n.º 2
0
        // end added by mb

        /// <summary>Adds an Attachment to the MailMessage using an Attachment instance</summary>
        /// <param name="attachment">Attachment you want to attach to the MailMessage</param>
        /// <example>
        /// <code>
        /// 	MailMessage msg = new MailMessage("*****@*****.**", "*****@*****.**");
        ///		Attachment att = new Attachment(@"C:\file.jpg");
        ///		msg.AddAttachment(att);
        /// </code>
        /// </example>
        public void AddAttachment(Attachment attachment)
        {
            if (attachment != null)
            {
                Attachments.Add(attachment);
            }
        }
Exemplo n.º 3
0
 public string AddImage(string filepath, string cid)
 {
     if (filepath != null)
     {
         Attachment image = new Attachment(filepath);
         image.ContentId = cid;
         _images.Add(image);
     }
     return cid;
 }