• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CFMAIL problem with Firefox

New Here ,
May 15, 2007 May 15, 2007

Copy link to clipboard

Copied

I am having problems with a page that sends out emails to multiple users in a contact database. The process works great in IE, but when I try to do it in Firefox the emails are not going out. I do not get any error message. I am taken to a results page that tells me the emails were sent, but they do not go through. The code is pasted below, if any one has any ideas I would really appreciate it. Like I said, the emails go through when I send them in IE, but not Firefox.

<CFSET RecList="">
<CFIF isDefined("FORM.subId")>
<CFSET DBList=#FORM.subId#>

<CFQUERY NAME="sltNewsletter" DATASOURCE="#APPLICATION.ds#" USERNAME="#APPLICATION.username#" PASSWORD="#APPLICATION.password#">
EXEC getNewsletter @letId=#letId#
</CFQUERY>

<CFQUERY NAME="getSubscribers" DATASOURCE="#APPLICATION.ds#" USERNAME="#APPLICATION.username#" PASSWORD="#APPLICATION.password#">
SELECT * FROM Subscribers WHERE subId IN (#DBList#)
</CFQUERY>

<CFSET emailText="#sltNewsletter.letBody#">
<CFSET emailText=ReReplace(emailText, "##", "####", "ALL")>
<CFSET emailText=Replace(emailText, "####subFirstName####", "##getSubscribers.subFirstName##", "ALL")>
<CFSET emailText=Replace(emailText, "####subLastName####", "##getSubscribers.subLastName##", "ALL")>

<CFLOOP FROM="1" TO="#getSubscribers.recordcount#" INDEX="x">
<CFSET thisTo="#getSubscribers.subEmail#">
<CFIF #getSubscribers.subFirstName# NEQ "" AND #getSubscribers.subLastName# NEQ "">
<CFSET thisTo="#getSubscribers.subFirstName# #getSubscribers.subLastName# <#thisTo#>">
</CFIF>
<CFMAIL FROM="#sltNewsletter.letFromName# <info@presidio1031.com>" TO="#thisTo#" SUBJECT="#sltNewsletter.letSubject#" TYPE="HTML">
#evaluate(de(emailText))#
</CFMAIL>
<CFSET thisTo=Replace(thisTo, "<", "(")>
<CFSET thisTo=Replace(thisTo, ">", ")")>
<CFSET RecList=ListAppend(RecList, thisTo)>
<CFQUERY NAME="updSubscribers" DATASOURCE="#APPLICATION.ds#" USERNAME="#APPLICATION.username#" PASSWORD="#APPLICATION.password#">
INSERT INTO Sub_gotNews ( gotThisMonth, subId, letId)
VALUES (1, #getSubscribers.subId#, #sltNewsletter.letId#)
</CFQUERY>
</CFLOOP>

</CFIF>

TOPICS
Advanced techniques

Views

315

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 15, 2007 May 15, 2007

Copy link to clipboard

Copied

What happens when you leave off the TYPE="HTML" attribute in the <CFMAIL> tag?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
May 15, 2007 May 15, 2007

Copy link to clipboard

Copied

Have you tried dumping your Form variables using <cfdump> to make sure all your form variables are present and accounted for when using firefox?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
May 15, 2007 May 15, 2007

Copy link to clipboard

Copied

LATEST
Also, I think you could probably lock down / speed up your code a little more by using <cfqueryparam> tags in your queries:

e.g.:
<CFQUERY NAME="getSubscribers" DATASOURCE="#APPLICATION.ds#" USERNAME="#APPLICATION.username#" PASSWORD="#APPLICATION.password#">
SELECT * FROM Subscribers WHERE subId IN (<cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#DBList#" list="Yes">)
</CFQUERY>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation