Any good tutorials on this subject - all I've seen in numerous books is
examples of running reports at determined intervals.  What I want to do is
run a template which contains a query and then outputs the results to
CFMAIL.  Can I do this using CFSchedule, or is there a better way?

Here's what I have now, and it won't work (I'm on a shared server with no
access to the CF Admin functions):

Any assistance or suggestions is/are appreciated.

Thanks,
Mark

-----------------------------
<!---Scheduler Template--->
<CFSCHEDULE ACTION="UPDATE"
            TASK="TestMessage"
            OPERATION="HTTPRequest"
                
URL="http://www.mydomain.com/admin/email/scheduler/test_email_process.cfm";
            STARTDATE="01/24/02"
            STARTTIME="06:45:00"
            INTERVAL="DAILY"
            RESOLVEURL="No"
            PUBLISH="No">
</cfschedule>

----------------------------
<!---Query/Email Sendout Template--->
        <CFQUERY NAME="q_sub"
                DATASOURCE="uspc">
                                SELECT      *
                                FROM         t_email, t_msg, t_sig, t_subcat, 
t_unsub_msg
                                WHERE       t_email.subcat_h = t_msg.t_subcat_ID AND 
t_msg.t_subcat_ID =
t_subcat.sc_id AND t_msg.dateofsend = DateValue(Now())
                </CFQUERY>

<CFIF q_sub.recordcount IS 0><cfabort></cfif>

<!--- Send out mail to the specified group--->
        <CFMAIL QUERY="q_sub"
                GROUP = "email"
                GROUPCASESENSITIVE="No"
                STARTROW="1"
        TO="""#firstname# #lastname#"" <#email#>"
        FROM="""John Doe"" <[EMAIL PROTECTED]>"
        SUBJECT="#msg_subject#"
        CC="#copy_to#"
        BCC="#blind_copy_to#"
        SERVER="127.0.0.1">
                        <cfmailparam name="Reply-To" value="""John Doe""
<[EMAIL PROTECTED]>">
<cfif q_sub.vit_ID NEQ 0>#trim(thought)# --#trim(author)##crlf##crlf#</cfif>
<cfif q_sub.txtmessage IS NOT "">#Trim(txtmessage)##crlf##crlf#</cfif>
<cfif unsublink IS "Yes">#trim(unsub_msg)##crlf##crlf#</cfif>
<cfif msg_sig IS "Yes">#trim(sig_line)#</cfif>
                </CFMAIL>

<!---Send a confirming Email to Mydomain.com indicating that the
messages have been delivered.--->


<!---Do not suppress whitespace in the email message--->
        <CFPROCESSINGDIRECTIVE SUPPRESSWHITESPACE="No">

        <CFMAIL
                TO="""John Doe"" <[EMAIL PROTECTED]>"
        FROM="""John Doe"" <[EMAIL PROTECTED]>"
        SUBJECT="Email Message Center Delivery Success"
        SERVER="127.0.0.1">
As of #LSDateFormat(Now(), "mmmm dd, yyyy")# #LSTimeformat(Now(),
"hh:mm:ss")#, #q_sub.recordcount# subscribers have been provided a
#q_sub.sub_category# message via automated email.

END OF MESSAGE

        </CFMAIL>

        </CFPROCESSINGDIRECTIVE>

<cfabort>
______________________________________________________________________
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to