Пример #1
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);
      }
 }
Пример #2
0
 public void AddImage(string filepath, string cid)
 {
     if (filepath != null)
     {
         Attachment image = new Attachment(filepath);
         image.contentid=cid;
         images.Add(image);
     }
 }
Пример #3
0
 public void AddAttachment(string filepath, string cid)
 {
     if (filepath != null)
     {
         Attachment attachment = new Attachment(filepath);
         attachment.contentid=cid;
         attachments.Add(attachment);
     }
 }