How do I insert image in email body

D

Digvijay Singh

hi,

I have to send an email with my company logo
in it.I am using ASP.Net 2.0.
My code looks like this
public static void SendEmail(string strSubject, string strTo, string
strFrom, string strMailMessage)

{

string strStyle = "style='font: 12px/18px Arial, Helvetica, sans-serif '";

MailMessage mail = new MailMessage();

mail.To = strTo;

mail.From = strFrom;

mail.BodyFormat = MailFormat.Html;

mail.Subject = strSubject;

mail.Body = "<font " + strStyle + ">" + strMailMessage + "</font>";

SmtpMail.SmtpServer =
ConfigurationManager.AppSettings["MailServer"].ToString();

if (strTo != "")

SmtpMail.Send(mail);

}

How do i add logo below this mail

Thanks in advance

Digvijay
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top