Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

ASP Net - HTML mail

 
Thread Tools Search this Thread
Old 08-06-2004, 11:47 AM   #1
Default HTML mail


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!



=?Utf-8?B?U2pvZXJ0IEViYmVu?=
  Reply With Quote
Old 08-06-2004, 04:44 PM   #2
Charles Chen
 
Posts: n/a
Default HTML mail
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!
>
>.
>



Charles Chen
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Store HTML table Values into Database subscribeid Software 0 09-05-2008 02:39 PM
How To Access HTML elements in code behind??? nedums_b Software 1 02-07-2008 07:15 PM
Applet to Servlet to HTML cisco_query Software 0 01-27-2008 05:32 PM
proble with html and javascript codes hiralcp Software 0 12-19-2007 02:20 PM
Got my certificate in the mail - what a joke! Jinkies A+ Certification 20 12-28-2003 08:38 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46