Question
Why won't this CFMAIL send mail??
Hi,
First of all I want to thank those of you that have helped me with a project over the last couple weeks. It's done and working my friends' (and their clients) satisfaction, and I couldn't have gotten there without your help.
I've got one unresolved problem I'm curious about:
On one page, I've got a cfmail that sends emails to candidates using a combination of recordset values and form variables, like so:
<cfoutput query="rs_House_Candidates">
<div>
<cfmail to="#rs_House_Candidates.EMAIL#" replyto="#Form.useremail#" failto="jsuligoy@sbcglobal.net" from="#Form.useremail#" subject="MAINE FAMILIES NEED YOUR HELP" server="relay-hosting.secureserver.net">
Dear #rs_House_Candidates.FIRSTNAME# #rs_House_Candidates.LASTNAME#,
#Form.usermessage#
Sincerely,
#Session.name#
</cfmail>
</div>
</cfoutput>
That works perfectly.
On another page, I'm trying to let a user send a message to friends. The code:
<cfmail to = "#rs_TafTemp.TAF_FRIEND#"
from = "#Session.tafuser#"
subject = "How to Keep Toxic Chemicals Out of Household Products"
server="relay-hosting.secureserver.net">
#rs_TafTemp.TAF_MESSAGE#
</cfmail>
This WON'T work, and I can't figure out why. I know all the variables contain good data because I output them to the page right below where the cfmail runs. They all output fine.
I tried the script with and without the cfoutput wrapping... I didn't think it was necessary since this isn't a repeating region like the first (working) example above, but I tried it with and without. It won't work either way.
HOWEVER, if i replace the "from" address with a static value, it works fine.
Any thoughts? No rush since it's working in a form acceptable to the clients, but it's buggin me.
And thanks again...
Joe
First of all I want to thank those of you that have helped me with a project over the last couple weeks. It's done and working my friends' (and their clients) satisfaction, and I couldn't have gotten there without your help.
I've got one unresolved problem I'm curious about:
On one page, I've got a cfmail that sends emails to candidates using a combination of recordset values and form variables, like so:
<cfoutput query="rs_House_Candidates">
<div>
<cfmail to="#rs_House_Candidates.EMAIL#" replyto="#Form.useremail#" failto="jsuligoy@sbcglobal.net" from="#Form.useremail#" subject="MAINE FAMILIES NEED YOUR HELP" server="relay-hosting.secureserver.net">
Dear #rs_House_Candidates.FIRSTNAME# #rs_House_Candidates.LASTNAME#,
#Form.usermessage#
Sincerely,
#Session.name#
</cfmail>
</div>
</cfoutput>
That works perfectly.
On another page, I'm trying to let a user send a message to friends. The code:
<cfmail to = "#rs_TafTemp.TAF_FRIEND#"
from = "#Session.tafuser#"
subject = "How to Keep Toxic Chemicals Out of Household Products"
server="relay-hosting.secureserver.net">
#rs_TafTemp.TAF_MESSAGE#
</cfmail>
This WON'T work, and I can't figure out why. I know all the variables contain good data because I output them to the page right below where the cfmail runs. They all output fine.
I tried the script with and without the cfoutput wrapping... I didn't think it was necessary since this isn't a repeating region like the first (working) example above, but I tried it with and without. It won't work either way.
HOWEVER, if i replace the "from" address with a static value, it works fine.
Any thoughts? No rush since it's working in a form acceptable to the clients, but it's buggin me.
And thanks again...
Joe
