I've always hated CDONTS, good thing they got rid of it.  CDONTS only works on windows NT and 2000 (ASP 1 and 2).  For windows 2000 and 2003 (ASP 2 and 3), you will need to use this:
 
<%
Const cdoSendUsingPickup = 1
 
set iMsg = CreateObject("CDO.Message")
set iConf = CreateObject("CDO.Configuration")
 
Set Flds = iConf.Fields
With Flds
    .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPickup
    ' TODO: Replace <PICKUP DIRECTORY> with path to your pickup directory
    ' Typically, c:\Inetpub\mailroot\pickup
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory")="c:\Inetpub\mailroot\pickup"
    .Update
End With
 

Dim iBP
With iMsg
   Set .Configuration = iConf
   .To = "[EMAIL PROTECTED]"
   .From = "[EMAIL PROTECTED]"
   .Subject = "New Junk Request"
   .HTMLBody = body
   'TODO: if adding an attachment,
   'uncomment the next line and alter file path as required
   'Set iBP = iMsg.AddAttachment(App.Path & "\file1.txt")
   .Send
End With
 
' Clean up variables.
Set iBP = Nothing
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing
%>


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of John Ivanoff
Sent: Friday, May 06, 2005 1:24 PM
To: [email protected]
Subject: Re: OT: Sending HTML Page with ASP

<%
EmailTest = "Thank you for registering"
email = "[EMAIL PROTECTED]"
' Send an email
Set myCDONTSMail = CreateObject("CDONTS.NewMail")
myCDONTSMail.Send  "[EMAIL PROTECTED]", cstr(email), "subject.", cstr(EmailTest)
Set myCDONTSMail  = Nothing
%>

this is a great example of how much easier CF is.


On 5/6/05, Jordan Gouger <[EMAIL PROTECTED]> wrote:
Hey guys I was wondering if anyone might have some suggestions on this:
 
I'm working on a site in Classic ASP and need a way to basically send out a receipt page that is in HTML. I'd like to be able to do something like its possible in CF, ie
 
<cfmail to="to" from="to" subject="">
<cfinclude template="filetomail.cfm">
</cfmail>
 
I know that its not possible to do something like that in ASP, but anyone has any suggestions I'd appreciate it.
 
Thanks,
 
Jordan



Reply via email to