public static CreateAttachmentFromString ( string content, |
||
content | string | |
contentType | ||
return |
public static Attachment CreateAttachmentFromString(string content, ContentType contentType)
{
if (content == null)
throw new ArgumentNullException("content");
MemoryStream ms = new MemoryStream();
StreamWriter sw = new StreamWriter(ms);
sw.Write(content);
sw.Flush();
ms.Position = 0;
Attachment a = new Attachment(ms, contentType);
a.TransferEncoding = TransferEncoding.QuotedPrintable;
return a;
}
Attachment::CreateAttachmentFromString ( string content, string name ) : |
|
Attachment::CreateAttachmentFromString ( string content, string name, |