Click here to Skip to main content
16,020,990 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
iam sending mail other customer. iam binding image also .but the problem is image not displayed at amil. iam attaching code also... plz find that..

string Body = sendMessage;
                //"<img alt=\"\" hspace=0 src=\"cid:imageId\" align=baseline border=0 ><br><hr><br><b> your new password for the tool www.achbiz.com a/c name "+username+"  is : "+password+"";
                AlternateView htmlView = AlternateView.CreateAlternateViewFromString(Body, null, "text/html");
                
                LinkedResource imagelink = new LinkedResource(path +
                @"\images\paymentcard.png", "image/jpeg");
                imagelink.ContentId = "imageId";
                imagelink.TransferEncoding = System.Net.Mime.TransferEncoding.Base64;
                htmlView.LinkedResources.Add(imagelink);
                myMess.AlternateViews.Add(htmlView);
                myMess.IsBodyHtml = true;
Posted
Updated 16-Jul-11 0:03am
v2

You can see this links
Click
Click
 
Share this answer
 
v2
There is a generic email routine here: Sending an Email in C# with or without attachments: generic routine.[^] which may help.
 
Share this answer
 

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