Connecting Tech Pros Worldwide Forums | Help | Site Map

Embed Image and send E-mail to Outlook Express

pbala's Avatar
Member
 
Join Date: Dec 2008
Location: Tamil Nadu
Posts: 34
#1: Jun 15 '09
How to insert a image in message body and send it to Outlook express using SMTP?

I used this code to attach a image file, i want to Embed the images in message..

Expand|Select|Wrap|Line Numbers
  1. public void SendMail(string from, string to, string subject, string body)
  2.         {
  3.             string filname = "G:\\Notes\\Sample Project\\Bday\\bh.gif";
  4.             MailMessage mail = new MailMessage(from, to, subject, body);
  5.             mail.Attachments.Add(new Attachment(filname));
  6.             SmtpClient smtpc = new SmtpClient();
  7.             smtpc.Host = "smtp.gmail.com";
  8.             smtpc.Send(mail);
  9.             mail.Dispose();
  10.         }

tlhintoq's Avatar
Moderator
 
Join Date: Mar 2008
Location: Arizona, USA
Posts: 1,779
#2: Jun 15 '09

re: Embed Image and send E-mail to Outlook Express


You're probably having trouble finding examples on-line because of termonology.

Try searching for "inline image" instead of 'embedded'.
Also I find that Google is allot more helpful if I include the programming language. For example, this search got me lots of good examples with the search "C# inline image email"

http://www.google.com/search?client=...UTF-8&oe=UTF-8
Reply