You can use CDOSYS from within ASP.Net by including the
CDOSYS dll file in your solution. CDOSYS provides much
more functionality than the .Net mail object.
Give it a shot. You would pretty much use it the same way
that you use CDOSYS from ASP. Very easy.
Sample CDOSYS usage (not for standard mail):
CDO.Message cdoMessage
= new CDO.MessageClass();
ADODB.Stream adoStream
= null;
CDO.ConfigurationClass cdoConfig
= new CDO.ConfigurationClass();
cdoConfig.Fields
[CdoConfiguration.cdoHTTPCookies].Value =
MakeCookieString(cookies);
cdoConfig.Fields
[CdoConfiguration.cdoURLGetLatestVersion].Value = true;
cdoConfig.Fields.Update();
try{
cdoMessage.MimeFormatted
= true;
cdoMessage.AutoGenerateTextBody = false;
cdoMessage.Configuration
= cdoConfig;
cdoMessage.CreateMHTMLBody
(url, CDO.CdoMHTMLFlags.cdoSuppressNone, "", "");
cdoMessage.BodyPart.Charset
= "utf-8";
cdoMessage.BodyPart.BodyParts
[1].ContentTransferEncoding = "quoted-printable";
adoStream
= cdoMessage.GetStream();
adoStream.Charset
= "utf-8";
adoStream.LineSeparator =
ADODB.LineSeparatorEnum.adLF;
}
catch(Exception ex){
throw new Exception
(String.Format
(_errorString, "MailUtilities.MhtmlGenerator.GetDataStream"
, ex.Message));
}
finally{
cdoMessage = null;
}
return adoStream;
-----Original Message-----
I hope this is the right forum to ask the following
question:
Using CDOSYS to send HTML mail and getting exclamation
mark ! at or after every 991st character. The application
worked fine on Windows 2000 but gives this problematic
behavior on Windows 2003. There is a solution for ASP
(set encoding to "quoted-printable") but we cannot seem
to find anything for .Net (C#).
Any suggestions would be appreciated!
.