To attach a file with your mail, add it to the mail by MailMessage.Attachments.Add() method. The simple way to add a file to mail is to specify the file name.
You can also specify a MIME content type which requires System.IO and System.Net.Mime namespace in addition to System.Net.Mail. The following code sample demonstrates how to use a Stream as a file attachment and how to specify MIME type:
Stream sr= new FileStream(@"FileName.txt", FileMode.Open, FileAccess.Read);
Mail.Attachments.Add(new Attachment(sr,” FileName.txt”, MediaTypeNames.Application.Octet));