philscheffer
12-17-2007, 03:51 PM
Problem:
This file is for automated email reminders. The emails are called by "template." It loops through the active emails. For each email it pulls a different set of email addressed with "getAddress." Here is the part I haven't been able to figure out; On screen (see image below) it appears that the emails pulled the proper data, and email lists. The emails right now are all directed at me, and I even get the proper number, including the correct "to" email addresses, of emails BUT the emails all have the email info (from, subject, body) as the first email in the loop.
Below is the code (from, to, etc. are hard coded for the time being), and a screen shot of the results (browser side.)
Any suggestions would be greatly appreciated! Thanks!
<cfloop query="template">
<cfset getAddress=getNonActivatedGreenKeys(#template.accountList#, "", "", #template.issuedDays#)>
<cfif debugmode>
<cfmail
query="getAddress"
server="#BG_MAIL_SERVER#"
from="#template.from#"
to=""
bcc=""
replyto=""
subject="#template.subject#"
spoolEnable="yes">#getAddress.issuedToEmail# #template.body#</cfmail>
<cfelse>
<cfmail
query="getAddress"
server="#BG_MAIL_SERVER#"
from="#template.from#"
to=""
bcc=""
replyto=""
subject="#template.subject#"
spoolEnable="yes">#template.body#</cfmail>
</cfif><!--- closes debugmode if --->
<div style="background-color: #FFFFFF; border: 2px solid #000000; padding: 10px; margin-bottom:15px;">
<p>
<b>Email Sent to <cfoutput>#getAddress.recordCount#</cfoutput> Recipients</b><br />
<cfoutput>
Name: #template.name#<br />
From: #template.from#<br />
Subject: #template.subject#<br />
Body: #template.body#<br />
</cfoutput>
</p>
</div>
</cfloop><!--- closes template query --->
http://www.philipscheffer.com/orphans/images/emailresults.jpg
This file is for automated email reminders. The emails are called by "template." It loops through the active emails. For each email it pulls a different set of email addressed with "getAddress." Here is the part I haven't been able to figure out; On screen (see image below) it appears that the emails pulled the proper data, and email lists. The emails right now are all directed at me, and I even get the proper number, including the correct "to" email addresses, of emails BUT the emails all have the email info (from, subject, body) as the first email in the loop.
Below is the code (from, to, etc. are hard coded for the time being), and a screen shot of the results (browser side.)
Any suggestions would be greatly appreciated! Thanks!
<cfloop query="template">
<cfset getAddress=getNonActivatedGreenKeys(#template.accountList#, "", "", #template.issuedDays#)>
<cfif debugmode>
<cfmail
query="getAddress"
server="#BG_MAIL_SERVER#"
from="#template.from#"
to=""
bcc=""
replyto=""
subject="#template.subject#"
spoolEnable="yes">#getAddress.issuedToEmail# #template.body#</cfmail>
<cfelse>
<cfmail
query="getAddress"
server="#BG_MAIL_SERVER#"
from="#template.from#"
to=""
bcc=""
replyto=""
subject="#template.subject#"
spoolEnable="yes">#template.body#</cfmail>
</cfif><!--- closes debugmode if --->
<div style="background-color: #FFFFFF; border: 2px solid #000000; padding: 10px; margin-bottom:15px;">
<p>
<b>Email Sent to <cfoutput>#getAddress.recordCount#</cfoutput> Recipients</b><br />
<cfoutput>
Name: #template.name#<br />
From: #template.from#<br />
Subject: #template.subject#<br />
Body: #template.body#<br />
</cfoutput>
</p>
</div>
</cfloop><!--- closes template query --->
http://www.philipscheffer.com/orphans/images/emailresults.jpg