Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string message ="my255CharText";
- using (System.IO.StreamWriter file = new System.IO.StreamWriter(@"\shareddatatempbuoy.txt"))
- {
- file.WriteLine(message);
- }
- MailMessage emailMsg = new MailMessage();
- emailMsg.To.Add("email@destination.com);
- emailMsg.Subject = "my Subject";
- emailMsg.From = new MailAddress("email@source.com");
- emailMsg.BodyEncoding = System.Text.Encoding.ASCII;
- emailMsg.IsBodyHtml = false;
- Attachment data = new Attachment(@"\shareddatatempbuoy.txt", MediaTypeNames.Text.Plain);
- emailMsg.Attachments.Add(data);
- ContentDisposition dispositon = data.ContentDisposition;
- dispositon.Inline=true;
- SmtpClient smtp = new SmtpClient("SMTP_SERVER");
- smtp.Send(emailMsg);
- Attachment data = new Attachment(message, MediaTypeNames.Text.Plain);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement