CFMAIL QUERY TIME OUT HANDLING
Hi All
I am facing issue with CFMAIL QUERY=”QUERYNAME”. I have 3 steps in a mail sending process as follows
Insert list to a table with mail send flag is FALSE
Send mail
Update mail send flag to TRUE
Issue that am facing is when request time occurs after sending some mails(eg query has 100 records and after sending to 15 emails) the update process in not done. That means when check the data base it shows that no mail has sent. Actually 15 mails were. How we handle this in cfmail query
Sample code:-
<!--- log table insertion --->
<cfoutput query="qrycontactlist">
<cfstoredproc datasource="xyzdsn" username="uname" password="pwd"
procedure="usp_insert_xyz">
<cfprocparam cfsqltype="CF_SQL_INTEGER" value="#contactid#">
</cfstoredproc>
</cfoutput>
<!--- newsletter sending --->
<cfmail query="qrycontactlist"
to="#email#"
from ="#from#"
failto="#failto#"
subject="#subject#"
TYPE="HTML" >
#body#
</cfmail>
<!--- update newsletter sent flag --->
<cfoutput query="cfevent.data.qrycontactlist">
<cfquery name="qryUpdateMailUpdateSatus12" datasource="xyzdsn" username="uname" password="pwd">
UPDATE
xyz
SET
mailstatus = 1
WHERE
contactid =<cfqueryparam value="#contactid#" cfsqltype="cf_sql_integer"/>
</cfquery>
</cfoutput>
