HTML mail

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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!
 
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;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top