Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_cdo thread: CDONTS and HTML


Message #1 by "DrClean" <Wayne@d...> on Wed, 17 Jan 2001 16:40:22 -0000
This is a multi-part message in MIME format.



------=_NextPart_000_0000_01C080A4.2F7718A0

Content-Type: text/plain;

	charset="iso-8859-1"

Content-Transfer-Encoding: 8bit



Hi,



I?m using CDONTS in my asp pages and trying to format in HTML (so there?s

some nice formatting if I want to send to clients). The HTML is coming out

as a text string showing the HTML tags, exactly as I put them in. I must be

doing something wrong ? and would appreciate your opinions. Here?s the

code:-



Dim objConfMail, objRepMail, strHTML



   strHTML = "<HTML>"

   strHTML = strHTML & "<Head>"

   strHTML = strHTML & "</Head>"

   strHTML = strHTML & "<Body>"

   strHTML = strHTML & "<P>Hi Admin, <Br><Br>The following was added to the

database:</P>"

   strHTML = strHTML & Session("RegUserID") & "<Br>" &_

                       Session("UserEmail") & "<Br>" &_

                       Session("Password") & "<Br>" &_

                       Session("UserType") & "<Br>" &_

                       Session("Title") & "<Br>" &_

                       Session("FirstName") & "<Br>" &_

                       Session("LastName") & "<Br>" &_

                       Session("UsersBusiness") & "<Br>" &_

                       Session("Position") & "<Br>" &_

                       Session("Address") & "<Br>" &_

                       Session("Town") & "<Br>" &_

                       Session("County") & "<Br>" &_

                       Session("Country") & "<Br>" &_

                       Session("PostCode") & "<Br>" &_

                       Session("TelephoneDay") & "<Br>" &_

                       Session("TelephoneEve") & "<Br>" &_

                       Session("Fax") & "<Br>" &_

                       Session("WebAddress") & "<Br>"

   strHTML = strHTML & "</Body>"

   strHTML = strHTML & "</HTML>"







   Set objConfMail = CreateObject("CDONTS.NewMail")

   With objConfMail

       .From = "register@D..."

       .To = "admin@d..."

       .CC = "wayne@s..."

       .Subject = "New User Added"

       .BodyFormat = CdoBodyFormatHTML

       .Body = strHTML

       .Send

   end With

   Set objConfMail = Nothing



You can tell I do things in a very simple way.



Thanks for your help



Wayne







  Return to Index