I'm having a problem sending emails from a page. I can send one page,
and sometimes I can send two, but not always. Here's the setup...
User fills out a form and I want to send myself an advice to act on, and
send the user a confirmation email.
If I type the addresses in both CFMAIL tags to be
[EMAIL PROTECTED] all's well and good and I get both emails arrive
here. If I put any other email address in the second email that email fails.
If I cut the CFMail tag from the working CFMAIL and paste it into the
non-working one, it now works. Good. Then I change nothing but the email
address and it stops working again. I've tried this address as a
variable, and as just typing an email address into the template. If
they're both the same addresses, fine, if they're different no.
Here's the relevant bits of the action page:
<!--- Set up the connections for the email --->
<!--- Trim the spaces out of the user's email address from the form --->
<cfset destination = "#trim(currentemail)#">
<!--- Send email to applicant --->
<cfmail
to="#destination#"
from="[EMAIL PROTECTED]"
subject="Subject of the form"
server="server ip address">
Thanks for filling out the form We will be evaluating your request in the
next 24-48 hours and will send you an email to confirm the outcome
yada yada yada ..
What you filled out was:
============================================================
Name: #YourName#
Your Email Address: #destination#
Variables from the form: #connection# #connection2#
============================================================
</cfmail>
<!--- Send email to webmaster --->
<cfinclude template="webmasteremail.cfm">
<cfmail
to="[EMAIL PROTECTED]"
from="[EMAIL PROTECTED]"
subject="Subject of the form"
server="server ip address">
#YourName# came to the site and filled out the request form. Please
respond as soon as possible. The details are as follows:
============================================================
Name: #YourName#
User's Email Address: #destination#
Variables from the form: #connection# #connection2#
============================================================
</cfmail>
<!--- Show thanks page. --->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Page title</title>
</head>
<body>
Thanks for being a nice guy.
</body>
</html>
I have been looking at this damn thing so long I can't see the wood for the
trees any more. Anyone see what I've got wrong?
Mike Kear
[EMAIL PROTECTED]
www.afp.zip.com.au
Windsor, NSW, Australia
AFP Web Development
AFP Electronic Forms
AFP Models
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists