Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Web.Mail Mail attachments
Message
General information
Forum:
ASP.NET
Category:
Other
Title:
Web.Mail Mail attachments
Miscellaneous
Thread ID:
00656182
Message ID:
00656182
Views:
42
Anyone know if there is a way to add a mail attachment file using just string instead of a physical file?

What I am looking to do is send a string of generated html as an attachment. I want to give it a file name without actually having to write it to disk. (I cannot just add it to the message because not all client e-mail systems support html)

In my ideal scenario, it would work like this:
(I have made up some property names, Content & PlugFileName, to show what I am looking to achieve.)
lsHtml = "<HTML> ……..</HTML>" ;
MailAttachment oAttachment = new MailAttachment();
oAttachment.Content = lsHtml ;
oAttachment.PlugFileName = "Report.htm" ;

MailMessage.Attachment.Add(oAttachment); 
Thanks in advance,


Bridgett
Chris
Next
Reply
Map
View

Click here to load this message in the networking platform