G
Guest
I'm writing a .Net 1.1 app that needs to send emails with the body being
formed by a locally served web page. Easy to do in legacy ASP. I found that
apparently CreateMHTMLBody is not supported via normal System.Web.Mail
constructs. It doesn't show up as a method on a message created this way. I
found a couple of posts that talked about adding references to CDO for
Exchange 2000. I did that and now VS2003 is giving me a correct method of my
message object to use CreateMHTMLBody. HOwever, when I run the code I get
"Unknown error" returned from the COM object. I've verified that the URL
being used is correct (copied it right out of the debugger and pasted it into
IE). I've tried both HTTP and File URLs. The HTTP URL returns the "Unknown
error" and the File URL returns "Must be an HTML file". The File URL is
"File://C:\inetpub\wwwroot\myapp\mailfile.htm".
Anyone have any ideas how to make this work? While I could use the
workaround I've seen posted to read the file into the HTMLBody as a string,
that results in sending URLs to embedded graphics that we'd rather not
publish.
Any help is greatly appreciated.
formed by a locally served web page. Easy to do in legacy ASP. I found that
apparently CreateMHTMLBody is not supported via normal System.Web.Mail
constructs. It doesn't show up as a method on a message created this way. I
found a couple of posts that talked about adding references to CDO for
Exchange 2000. I did that and now VS2003 is giving me a correct method of my
message object to use CreateMHTMLBody. HOwever, when I run the code I get
"Unknown error" returned from the COM object. I've verified that the URL
being used is correct (copied it right out of the debugger and pasted it into
IE). I've tried both HTTP and File URLs. The HTTP URL returns the "Unknown
error" and the File URL returns "Must be an HTML file". The File URL is
"File://C:\inetpub\wwwroot\myapp\mailfile.htm".
Anyone have any ideas how to make this work? While I could use the
workaround I've seen posted to read the file into the HTMLBody as a string,
that results in sending URLs to embedded graphics that we'd rather not
publish.
Any help is greatly appreciated.