By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,919 Members | 1,074 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,919 IT Pros & Developers. It's quick & easy.

Set ContentBase in HTML Email using CDO

P: n/a
Hello All:

I am trying to understand how to set the ContentBase of an HTML email
I'm sending using CDO. The HTML source can be any .aspx page on on the
website. Basically, I'm creating an "Email This Page" link.

I am able to get the email sent just fine. However, all the images are
referenced using relative urls (which is what I prefer to use in all my
Webforms) and therefore, the image and style sheet references are

Isn't there a way to use the ContentBase property such that the
relative urls are referenced from a full url as specified through the

My code is as follows:


void Send_Email( object s, EventArgs e )
CDO.Message msg = new CDO.MessageClass();
CDO.CdoMHTMLFlags.cdoSuppressAll,"", "");
msg.To = emailTo.Text;
msg.CC = emailCC.Text;
msg.From = "in**";
msg.Subject = "Thank You!";
msg.TextBody = "http://localhost/mypage.aspx?print=Y";

msg.Configuration.Fields[CDO.CdoMailHeader.cdoContentBase].Value =

= 2;

= 25;

= "";

Thank you in advance for your help.

Feb 7 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.