Last post Aug 11, 2008 10:04 AM by ManjunathMR
Aug 08, 2008 04:34 AM|ManjunathMR|LINK
I'm creating small application written in C# which is going to be used for sending emails from webpage.
It has 4 textboxes : From, Bcc, Msg, and EmailUrl.
And now to my problem: When user puts url in EmailUrl textbox the application must send webpage with embedded images.
Now, i don't want to save all images from that webpage to the disk, but i want to find other solution. I heard that it can be done by storing images in memorystream and then pass it to the Linkedresource but i can't make it work.
I've created functions for retrieving html, retrieving img urls with complete path (not just i.e. images/image.jpg), sending email etc. .
Thank you in advance!
Aug 11, 2008 10:04 AM|ManjunathMR|LINK
This is the soln.
1.Find the image tags in the email body(HTML).
2.Request for the image thru the url(got from the 'src' field of the image tag) and read the stream response .
3.attach the stream to the mailmessage giving it's type and an unique_id.
4.In the mailbody replace the src field of the image tag with "cid:unique_id".
Manjunath M. R.