Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CFMAIL Not Sending - Please Help

Status
Not open for further replies.

stephenmbell

IS-IT--Management
Jan 7, 2004
109
US
I have a page that submits a form to an email address. The CF Version is 8.0 enterprise, and the site is not hosted in site, so there is no way for me to access the smtp server settings on the CF Administrator.

That being said, here is my code: (I have tried both from attributes individually, and still have the problem)

Code:
<cfparam name="name" type="string" default="NOT ENTERED">
<cfparam name="phone_number" type="string" default="NOT ENTERED">
<cfparam name="email" type="string" default="NOT ENTERED">
<cfparam name="msg" type="string" default="NOT ENTERED">

<cfmail server="mail.bouncesbysunshine.com" 
  useSSL="no" 
  useTLS="no" 
  username="user"
  password="pw" 
  to="myemail@gmail.com"  
  subject="Bounces By Sunshine - Contact Us"
  from="website@bouncesbysunshine.com"
  <!---
  from="#email#"
  --->
  >
Name:		#name#
Phone:		#phone#
Email:		#email#

Special Requests:
-------------------------
#msg#
-------------------------

</cfmail>

<html>
<head>
</head>

<body>
<form name="form" method="post" action="/index.cfm">
  <script language="javascript">
    alert("Your Mail Has Been Received, Thank You for visiting Bounces By Sunshine")
	document.form.submit()
  </script>
</form>
</body>
</html>

The form submits fine, I do not recieve any errors on the form OR the action page (code above) - I simply do not recieve the email.

I have verified that I can pop into and smtp out of the account listed in the username / password attributes using thunderbird.

Please give some suggestions on where else to look / what else to try..


Thanks in advance

sb
 
Are you sure the server name is server="mail.bouncesbysunshine.com"?

Wrap the <cfmail> tag around <cftry><cfcatch> and do a <cfdump> of any issues (if any at all). The <cfdump> will provide any/all causes for the <cfmail> to fail.

Also, try removing server="mail.bouncesbysunshine.com". It may be safe to assume that if you're on a shared hosting company then the mail server is configured in a way that you don't need to define the server attribute in the cfmail tags.

Remove the <!--- from="#email#" ---> from within the <cfmail> start tag.


_____________________________
Just Imagine.
 
I did as you suggested before removing the server attribute - i have not recieved anything.

I removed the server attribute and go the following detail in the cfdump..

"Detail To send SMTP mail messages, ColdFusion requires that a default SMTP server be specified. You can set the default SMTP server using the Mail page of the ColdFusion Administrator. Alternatively, you can ensure that all cfmail tags have a server attribute. In this case, no server attribute was provided and no default SMTP server setting has been specified. "

So it look like they do not have a default SMTP server setup. Is this necessary in order to send email???

Thanks
 
Have you contacted the hosting company about this to see what their policy is? Add the server attribute back in, and run the <cfmail> tag with the <cftry><cfcatch> in it to see if the same error message gets displayed.

BTW, for future reference try NOT posting your actual info here, such as the mail server used, actual e-mail addresses, query table names/columns, or other sensitive information.

_____________________________
Just Imagine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top