Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Web.Mail Mail attachments
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00656182
Message ID:
00656228
Views:
9
The Web.Mail namespace depends on the CDOSYS (Collaboration Data Objects for Windows 2000) component. I only see filenames supported for attachments. My guess is that you would need to write it to a temp file and clean up the temp file after you send.


>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform