The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages - More
> ColdFusion Development
|
ColdFusion Send Email Simple problem
Discuss ColdFusion Send Email Simple problem in the ColdFusion Development forum on Dev Shed. ColdFusion Send Email Simple problem ColdFusion Development forum discussing CFML coding practices, tips on CFML, and other CFML related topics. Find out why ColdFusion is the tool of choice for many e-commerce developers.
|
|
 |
|
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

April 30th, 2012, 09:16 AM
|
|
Registered User
|
|
Join Date: Apr 2012
Posts: 7
Time spent in forums: 1 h 9 m 53 sec
Reputation Power: 0
|
|
|
ColdFusion Send Email Simple problem
Hi All
I am having problems sending an email via coldFusion. Does anyone know how to send an email so that it actually arrives at the destination? What settings are required.
Many thanks
Dave
|

April 30th, 2012, 09:44 AM
|
|
Registered User
|
|
Join Date: Apr 2012
Posts: 4
Time spent in forums: 35 m 18 sec
Reputation Power: 0
|
|
|
You use the cfmail tag dude.
|

May 1st, 2012, 09:40 AM
|
|
Registered User
|
|
Join Date: Apr 2012
Posts: 7
Time spent in forums: 1 h 9 m 53 sec
Reputation Power: 0
|
|
|
Hi
Thanks for that, do you have any example code for me to look at?
Thanks
D
|

May 1st, 2012, 09:44 AM
|
|
Registered User
|
|
Join Date: Apr 2012
Location: London
Posts: 16
Time spent in forums: 1 h 55 m 19 sec
Reputation Power: 0
|
|
Quote: | Originally Posted by davethomas1972 Hi
Thanks for that, do you have any example code for me to look at?
Thanks
D |
Create a page called email.cfm
Code:
<cfmail to="email@domain.com"
from="email@domain.com"
subject="This is a test subject"
type="text">
Hello Test
This is the body Text
Best wishes
xx
</cfmail>
<cfoutput>
<p>Mail sent</p>
</cfoutput>
|

May 1st, 2012, 09:48 AM
|
|
Registered User
|
|
Join Date: Apr 2012
Location: London
Posts: 16
Time spent in forums: 1 h 55 m 19 sec
Reputation Power: 0
|
|
|
Sorry forgot to mention: Change the code to match the email addresses you want to use then Hit the email.cfm page you created above in a browser.
|

May 1st, 2012, 09:51 AM
|
|
Registered User
|
|
Join Date: Apr 2012
Posts: 7
Time spent in forums: 1 h 9 m 53 sec
Reputation Power: 0
|
|
|
Hi
I have done this but am not receiving the emails, any ideas?
Thanks
|

May 1st, 2012, 09:52 AM
|
|
Registered User
|
|
Join Date: Apr 2012
Location: London
Posts: 16
Time spent in forums: 1 h 55 m 19 sec
Reputation Power: 0
|
|
|
Are you using a shared hosting plan or a dedicated server?
|

May 1st, 2012, 09:52 AM
|
|
Registered User
|
|
Join Date: Apr 2012
Posts: 7
Time spent in forums: 1 h 9 m 53 sec
Reputation Power: 0
|
|
|
Dedicated Server.
|

May 1st, 2012, 09:55 AM
|
|
Registered User
|
|
Join Date: Apr 2012
Location: London
Posts: 16
Time spent in forums: 1 h 55 m 19 sec
Reputation Power: 0
|
|
|
You need to login to coldFusion administrator and setup your email settings, do as follows:
Goto the administrator and setup as follows:
Mail Server: localhost
Server Port: 25
"Verify Mail Server Connection - when checked, verifies that ColdFusion can connect to the mail server when the "Submit Changes" button is clicked."
Click save and hopefully this will work, let us know if this worked?
|

May 1st, 2012, 09:56 AM
|
|
Registered User
|
|
Join Date: Apr 2012
Location: London
Posts: 16
Time spent in forums: 1 h 55 m 19 sec
Reputation Power: 0
|
|
|
Why dont you ask your hosting provider to help you out. I work for a provider called Hyve and we would help you through this.
|

May 1st, 2012, 10:16 AM
|
|
Moderator
|
|
Join Date: Jun 2002
Location: Raleigh, NC
|
|
Setting up the server to interact with a mail server and sending email is pretty thoroughly covered in the documentation. http://tinyurl.com/74tmdwr
Quote: | Originally Posted by davethomas1972
I have done this but am not receiving the emails, any ideas? |
|

May 3rd, 2012, 10:42 AM
|
|
Registered User
|
|
Join Date: Apr 2012
Posts: 7
Time spent in forums: 1 h 9 m 53 sec
Reputation Power: 0
|
|
Thanks for that, I asked my hosting company to help me out but they said I need a management contract! Very usefull.... not.
Anyway ive now setup the code to send out the email by following the instructions
Code:
<cfmail to="email@domain.com"
from="email@domain.com"
subject="This is a test subject"
type="text">
Hello Test
This is the body Text
Best wishes
xx
</cfmail>
<cfoutput>
<p>Mail sent</p>
</cfoutput>
and I am getting the "Mail sent" message however I am not getting the email sent to me into my inbox
Thanks guys for your help. I checked the co0ldFusion docs as recommended and its a bit complex for my skills
Thanks again
Dave
|

May 3rd, 2012, 11:02 AM
|
|
Registered User
|
|
Join Date: Apr 2012
Posts: 7
Time spent in forums: 1 h 9 m 53 sec
Reputation Power: 0
|
|
|
ok
|

May 3rd, 2012, 11:05 AM
|
|
Registered User
|
|
Join Date: Apr 2012
Location: London
Posts: 16
Time spent in forums: 1 h 55 m 19 sec
Reputation Power: 0
|
|
|
I will ask around and see what could be the problem here, definitely ask your host about this one.
|

May 3rd, 2012, 11:26 AM
|
|
Registered User
|
|
Join Date: Apr 2012
Location: London
Posts: 16
Time spent in forums: 1 h 55 m 19 sec
Reputation Power: 0
|
|
|
Ok i asked around for you, the problem could be you dont have a PTR setup on your servers IP/domain and your email is going to Spam or being blocked.
A PTR allows the mail server receiving the email to check what domain is associated with the IP address that sent the email and thus check that the email is not in fact spam.
Ask your host to setup one for you and hopefully this is the issue
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|