Skip to main content
February 26, 2009
Question

CFMAIL on QUERY

  • February 26, 2009
  • 2 replies
  • 455 views
So I have the code below running and it sends to most of the query results but not all....

I have even tried running the CFMAIL in a normal query driven CFOUTPUT - and though my on screen display proves that each record is returned by the query... some emails never go out.

then I have to sit down and look at my email box (cause I get the BCC) and find out who was missed and send to that group... and then check again....

the record counts are between 40 and 100.
    This topic has been closed for replies.

    2 replies

    Participating Frequently
    February 28, 2009
    I agree with Michael.

    Also, why don't you check with the log file to identify the exact reason of the cause.
    ColdFusion logs all errors that occur during sending mail to the file "mail.log". You can find the file here:

    In Windows: \CFusion\Mail\Undelivr
    On UNIX: /opt/coldfusion/mail/undelivr

    What do you say about it!?
    Inspiring
    February 26, 2009
    Have you tried it this way?

    <cfquery datasource="dbname" name="webcast">
    SELECT *
    FROM Seminars
    WHERE SeminarID = 15
    </cfquery>

    <cfoutput query="webcast">

    <CFMAIL server="mail.servername.com" to="#webcast.email#"
    from="customerservice@domain.com" bcc="me@domain.com" subject="Thank You
    for
    Attending Our Webcast" type="html">

    blah blah blah

    </cfmail>

    </cfoutput>



    From there, you could add a simple <cftry><cfcatch> block to trap any
    errors and email you a list of successful or bad attempted addresses...
    among other possibilities.




    --
    Michael Evangelista, Evangelista Design
    Web : www.mredesign.com Blog : www.miuaiga.com
    Developer Newsgroups: news://forums.mredesign.com