Click here to Skip to main content
15,920,030 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have copied and pasted an image in editor and In the source of the email I see this:
HTML
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAB3CAIAAAA LltztAAAACXBIWXMAAC4jAAAuIwF4pT92AAAgAElEQVR4nOS9a bNtx3UYttbq7j2dc+70RjxMDyBBgATFCZxARqLliJZVqZIiSxU nX8KkyhatquRDSiVV7Ers/AeVEyWRlFSksmVKjijbpERSUjSQ4AhwFgGCAPEAPOBNdzrDHrp 7rZUPfc6++5573wMpxS4p7Dr13r57d/fu7jUP3RtVAwC0rUfELMtEhIgAIIRgraeLhC0UkrQxwghjLPGK BFIqJNC7UspxTnX2oI+AqY73IytttrcBCxg94AquAph/nrXjLsabmSc/lPudDXbEWGMvcPee2ApnLFSykgGXIj/F0mJ7ZO8rcpeAAAAAElFTkSuQmCC" width="365" height="167" style="border: 0pt none;display:block;float:left;margin:0pt 0pt 0pt 0pt;" title="embedded image (png)" alt="[image]">

If I open the file with internet explorer the image shows fine but through outlook it does not work. I've read that emails expect images using the cid tags.
Another solution I got is to upload the images to a web server and replace the image data with URLs to the images on the server.
Could somebody help me out?
Posted
Updated 4-Sep-12 19:36pm
v2
Comments
Sandeep Mewara 5-Sep-12 1:37am    
Not clear on what exactly are you trying? IE, Outlook and web server?
kshama goyal 5-Sep-12 1:40am    
I have to send this image to Outlook. but i dont know how to achieve it as my HTML file shows the image but when sent to outlook Image is not displayed.
AmitGajjar 5-Sep-12 2:07am    
You answered your question. Second way is what you need to do.
kshama goyal 5-Sep-12 2:15am    
Problem is I dont know how to do it. I dont know how to upload the image on webserver and then Mpdify the src tag to keep web server location. could I get some sample code for it?

1 solution

Here is the code to upload image in web server
C#
if (Fileuploader1.FileName != "")
            {
                if (File.Exists(Server.MapPath("../images/" + "imagename" + ".jpg")))
                    File.Delete(Server.MapPath("../images/" + "imagename" + ".jpg"));
                Fileuploader1.SaveAs(Server.MapPath("../images/" + "imagename" + ".jpg"));   
            }


Hope you are storing image path in your database; while updating image update image path in database.
Before applying this check server can be modified by user else you cannot upload image.

If any further query feel free to ask.
 
Share this answer
 
Comments
kshama goyal 5-Sep-12 4:45am    
I dont have the image physically stored anywhere. I have just copied and pasted it in editor and this image is shown with its binary data in <img tag as you can see in my question.
sahabiswarup 5-Sep-12 6:37am    
Then do a trick like this..
Upload the image in some free server like tinypic.com and copy the image link location and add that to your editor and upload that content in your database.
Hope it works..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900