Tutorial by Examples

Here is the example of creating of mail message with attachments. After creating we send this message with the help of SmtpClient class. Default 25 port is used here. public class clsMail { private static bool SendMail(string mailfrom, List<string>replytos, List<string> mailtos, L...
MailMessage represents mail message which can be sent further using SmtpClient class. Several attachments (files) can be added to mail message. using System.Net.Mail; using(MailMessage myMail = new MailMessage()) { Attachment attachment = new Attachment(path); myMail.Attachments.Add...

Page 1 of 1