There is nothing wrong with your code. It works perfectly using my own mail server.
What I would assume is the mail server you are sending through doesn't like your From address. Many times when you see this behavior it is due to a secure mail server wanting a from address that it recognizes. It could also be that the server doesn't allow relaying at all.
Hope that helps.
Main Topics
Browse All Topics





by: RCorfmanPosted on 2006-03-11 at 16:26:27ID: 16165063
The mail is spooled to the cold fusion administrator, and if you aren't an administrator, you don't see what transpired.
h.detail)# "> Message#</ cfoutput>< /p>
I actually disable the spooling and capture the mail errors from within my page so that I (and the user) know what happened (or didn't).
This isn't all the code, but it is the salient points surrounding the mail tag. Notice the SpoolEnable="no" as well as the try/catch block. If the mailing fails, you will now see it within the cold fusion page and can act appropriately. I just wanted to display a message if it was sent, or if there was a mailing failure...
<CFSET MailCompleteMessage = "Success sending email">
<CFTRY>
<CFMail from="#MailFrom#" to="#MailTo#" cc="#MailCC#"
subject = "Email Subject Here!"
SpoolEnable="no">
Email Body Here!!!
</CFMAIL>
<CFCATCH type="Application">
<CFSET MailCompleteMessage = "Mailing Failed... Error is: <br>#htmlEditFormat(cfcatc
</CFCATCH>
</CFTRY>
<p><cfoutput>#MailComplete