not sure that it can be done. I have always use COM interop with CDO.
Create a "source" web page with your image and point to it. You are creating
an embeded HTML email.
-Andrew
CDO.Message message = new CDO.Message();
CDO.Configuration configuration = new CDO.Configuration();
ADODB.Fields fields = configuration.Fields;
fields[CDO.CdoConfiguration.cdoSendUsingMethod].Value =
CDO.CdoSendUsing.cdoSendUsingPort;
fields[CDO.CdoConfiguration.cdoSMTPServer].Value = "127.0.0.1";
fields[CDO.CdoConfiguration.cdoSMTPServerPort].Value = 25;
fields[CDO.CdoConfiguration.cdoSMTPConnectionTimeout].Value = 30;
fields.Update();
message.Configuration = configuration;
message.To = textBoxTo.Text;
message.From = textBoxFrom.Text;
message.Subject = textBoxSubject.Text;
message.TextBody = "This is your message body.";
try
{
message.CreateMHTMLBody(textBoxUrl.Text, CDO.CdoMHTMLFlags.cdoSuppressNone,
textBoxUsername.Text, textBoxPassword.Text);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
System.Diagnostics.Debug.WriteLine(ex.Message);
}
message.Send();
William F. Robertson said:
Anyone have any reference for adding a image inline into a email body, using
the System.Web.MailMessage? If not MailMessage, then anything else
would
be
nice.
ie using the cid and embedding the image with the email
Thanks,
bill