private void AddAttachmentFromStream(MailMessage message, String data, String attachmentName)
{
MemoryStream stream = new MemoryStream(UTF32Encoding.Default.GetBytes(data));
stream.Position = 0;
// Create a new attachment, add the attachment to the supplied message.
Attachment att = new Attachment(stream, attachmentName);
message.Attachments.Add(att);
}
Apr 20, 2007
Convert string to Stream
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment