Skip to main content
June 10, 2009
Question

CFMAIL

  • June 10, 2009
  • 1 reply
  • 429 views

I have a script that sends a newsletter out to 750+ users. Recently I have been getting an error that my application varriables aren't being recognized upon execution. If I slim down the query to just send 1 user the newsletter, the script works. As soon as I try to send it to all I get the application variable error. Scratching head...

This an example of the cfmail code.

  <!--- Retrieve "mailing list" records from database --->
  <CFQUERY DATASOURCE="DBase" NAME="GetInfoQuery">
    SELECT First, Last, EMailAddress, ID
    FROM DBTable
    WHERE MList = yes
  </CFQUERY>

<CFMAIL
    QUERY="GetInfoQuery"
    GROUP="ID"
    GROUPCASESENSITIVE="No"
    server="mail.server.com"
    STARTROW="1"
    SUBJECT="Subject"
    TO="""#First# #Last#"" <#EmailAddress#>"
    FROM="""#APPLICATION.vairiable#"" <#APPLICATION.EmailAddressVariable#>"
    TYPE="HTML">
<cfinclude template="template.cfm">
</CFMAIL>

    This topic has been closed for replies.

    1 reply

    Participating Frequently
    June 11, 2009

    Are you reseting the Application variables on every request ? (a

    scenario that I can thing about is that the mail sending happens in a

    request and takes a couple of seconds and in a separate requests the

    application variables are deleted and then recreated by a separate

    request - some kind of race-condition)...

    Mack