Skip to main content
Known Participant
June 4, 2013
Question

email notifications

  • June 4, 2013
  • 2 replies
  • 776 views

Hi,

I have the page to query out the records from the database then writes this results in to the csv file then place into specific location. 

I have my schedule task to call this page on every thursday moring.  Everything works fine but i now want to notify users when this page completed.  How can do this?, please be advice?

Thanks

March

    This topic has been closed for replies.

    2 replies

    p_sim
    Participating Frequently
    June 5, 2013

    You could implement a Directory Watcher with Event Gateway. The sample code is in the CF docs.

    http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec15849-7fdb.html

    cherdt
    Inspiring
    June 4, 2013

    You can use the cfmail tag to do this. Example:

    <cfmail from="your.address@your.domain" to="recipient.address@any.domain" subject="CSV file updated successfully">

    The CSV file #filename# was processed successfully at #TimeFormat(now(), "hh:mm:ss")#.

    </cfmail>

    You can include variables in the message, as shown above.

    newcfAuthor
    Known Participant
    June 5, 2013

    Hi,

    Thanks for your responded.  How can i attached file in the email.  Please see my code below.

    Thanks

    <cffile action="write" file="#variables.file#" output="#Str#">

    <cfmail from="myapp@no-reply.com" to="mymail@domain.com" subject="CSV file updated successfully">

    The CSV file #filename# was processed successfully at #TimeFormat(now(), "hh:mm:ss")#.

    </cfmail>

    p_sim
    Participating Frequently
    June 5, 2013

    Refer to CF docs.

    http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7c15.html

    You use cfmailparam with attribute file. See the code in Example 1.