This is how I do it:
MailMessage msg = new MailMessage();
msg.To = "[EMAIL PROTECTED]";
msg.From = "[EMAIL PROTECTED]";
msg.BodyFormat = MailFormat.Html;
msg.Body = "<html><body><img src='test.jpg'></body></html>";
MailAttachment att = new MailAttachment("test.jpg",
MailEncoding.Base64);
msg.Attachments.Add(att);
SmtpMail.SmtpServer = "...";
SmtpMail.Send(msg);
Thanks,
Shawn Wildermuth
[EMAIL PROTECTED]
> -----Original Message-----
> From: Moderated discussion of advanced .NET topics.
> [mailto:[EMAIL PROTECTED]] On Behalf Of Andrew Davey
> Sent: Thursday, July 18, 2002 11:37 PM
> To: [EMAIL PROTECTED]
> Subject: [ADVANCED-DOTNET] Embedding images using System.Web.Mail
>
>
> Hi,
>
> does anyone know the best way to go about embedding images in
> a html mail message that will be sent using
> system.web.mail.smtpmail.send()?
>
> TIA
>
> Andy
>
> You can read messages from the Advanced DOTNET archive,
> unsubscribe from Advanced DOTNET, or subscribe to other
> DevelopMentor lists at http://discuss.develop.com.
>
You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.