I am sending the email using C#
This is a piece of the code i am using:
LinkedResource Lnkr = new LinkedResource(LogoPath);
Lnkr.ContentType.Name = "Logo.jpg";
Lnkr.ContentId = "Image1";
AlternateView av1 = AlternateView.CreateAlternateViewFromString("<br/><img src='cid:Image1'/>", null, MediaTypeNames.Text.Html);
av1.LinkedResources.Add(Lnkr);
Emailmsg.AlternateViews.Add(av1);
Please Don’t recommend to use the image path as directly pick from some server like “http://ww.a.jpg”
The problem is the image is displayed but is also added as an attachment.
I dont the image to be added as an attachement.
Any help is appreciated.
The image has to be stored somewhere, so it’s attached to your email. I you use absolute path in your img src then the image isn’t attached.
You can embed the image as a 64based string but I don’t think that is supported by a lot of email clients.
http://en.wikipedia.org/wiki/Data_URI_scheme