Why do you need to write file to disk and to read it again when attachent is created? I guess you can use methods when attachment is created from ready string.
// Attach the message string to this e-mail message.
Attachment data = new Attachment(textMessage, MediaTypeNames.Text.Plain);
data.Name = "test.csv";
Found here: http://msdn.microsoft.com/ru-ru/library/9089e309(v=vs.110).aspx Or try this method: http://msdn.microsoft.com/ru-ru/library/ms144617(v=vs.110).aspx