Mail with Attachment

suggest change

MailMessage represents a mail message, which SmtpClient can send. Several file attachments can be added to the message. Disposing the message also disposes its attachments.

using System.Net.Mail;

using(MailMessage myMail = new MailMessage())
{
     Attachment attachment = new Attachment(path);
     myMail.Attachments.Add(attachment);

     // further processing to send the mail message

}

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents