Set TextStream = FSO.OpenTextFile(TestFilePath & "\bob.html", 1)
body = TextStream.ReadAll
 
Then, run the code below
 
Jacob


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jordan Gouger
Sent: Friday, May 06, 2005 2:15 PM
To: [email protected]
Subject: RE: OT: Sending HTML Page with ASP

Thanks for the help everyone but perhaps I should clarify more.
 
In my CF applications, I essentially use the <cfmail> as a wrapper tag and call many include files. The actual contents of the e-mail are the rendered content from the includes. I usually do this because it is easier than recreating all of the loops, queries, etc inside of <cfmail>. Much of the content in includes is dynamic.  I'm trying to figure out a way to do something like this in ASP without having to rewrite everything. In an ideal situation, I'd like to be able to set the contents of a rendered page to a variable name and then pass that into CDO. If that won't work, would it be possible to execute an ASP page and then send the rendered content as an attachment?
 
Thanks,
 
Jordan

Jacob Cameron <[EMAIL PROTECTED]> wrote:
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 < SPAN style="FONT-FAMILY: courier new,monospace">

%>

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