?
Solved

Coldfusion mail not sending

Posted on 2007-07-23
33
Medium Priority
?
2,280 Views
Last Modified: 2013-12-24
Hey all,
 
     I recently setup the galleon message boards on my coldfusion server (
http://galleon.riaforge.org/) and everything seems to work except when it sends e-mails to users.  I have IIS 5.1 set up on my windows XP machine and i think everything is configured properly.  It doesn't throw up any errors; mail just doesn't get sent at all.  Can someone help me figure this out?  Thank you.
0
Comment
Question by:andrewaiello
  • 18
  • 15
33 Comments
 
LVL 14

Expert Comment

by:Scott Bennett
ID: 19557020
are the mail messages getting put into the c:\cfusionmx7\mail\underlivr\ folder or are they actually being successfully sent to the SMTP server and getting stuck there?

If they getting stuck in the undelivr folder then you should be able to look a the coldfusion mail log (c:\cfusionmx7\logs\mail.log) to get the error messages.

If they are not getting stuck in the undelivr folder then you should check the logs on your SMTP server.
0
 
LVL 1

Author Comment

by:andrewaiello
ID: 19562737
They are getting stuck in the coldfusion undelivered folder.  I checked the logs and am getting errors like:

"Error","web-3","07/23/07","00:53:22",,"Mail: 'Forums Confirmation Required' From: 'forum@localhost' was missing server information."

"Error","scheduler-2","07/23/07","01:14:56",,"Could not connect to SMTP host: 127.0.0.1, port: 25;   nested exception is:       java.net.ConnectException: Connection refused: connect"

and then when I enabled relaying (as someone requested) I get stuff like:

"Error","scheduler-1","07/23/07","01:45:42",,"Invalid Addresses;   nested exception is:       class javax.mail.SendFailedException: 550 5.7.1 Unable to relay for test@excite.com "


Any thoughts on how to approach this?  Thanks
0
 
LVL 14

Expert Comment

by:Scott Bennett
ID: 19566727
do you have your mail settings configured properly in coldfusion administrator?

Make sure the ip matches the ip on your SMTP service.
Make sure the port is the correct port.
Assuming you have a recent version of CF you should not have to have an open relay (in fact I would recomend never having an open relay unless you are specifically allowing only certain ip's to relay messages), just enter the username and password in the mail server settings like "user:password@127.0.0.1"
check the "Verify mail server connection" box and hit "submit changes" to make sure CF can connect to the SMTP server.


0
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 
LVL 1

Author Comment

by:andrewaiello
ID: 19566952
Okay I'll check that when I go home; but I do remember that when i set it up the coldfusion verify mail check did say "OK"
0
 
LVL 14

Expert Comment

by:Scott Bennett
ID: 19567123
It is possible for it to say OK but not really work. The verification does not actually attempt to send an email it just establishes and SMTP connection to verify the server can be contacted. In your SMTP servers relay settings you should be able to allow/whitelist a list of trusted IP's so I would make sure that 127.0.0.1 is on that list.
0
 
LVL 1

Author Comment

by:andrewaiello
ID: 19574582
Okay, the IP in the coldfusion mail config was different from the IP in the SMTP config so i changed it.  (it was 192.168.1.33 for the SMTP, and 127.0.0.1 for the coldfusion, now they are both 192.168.1.33)  I know these refer to the same computer but i figured i'd make it exactly the same anyway; both of the ports are 25.  This still did not work though; but I noticed that this time the mail didnt appear in the coldfusion undelivered folder (at least not after i gave it a few minutes).   What do you think my next step should be?  Thanks.
0
 
LVL 14

Expert Comment

by:Scott Bennett
ID: 19575529
Ok now you will want to check the configuration of your SMTP service.

Check this by load Internet Information Services Manager
Right click SMTP Server, choose properties
Choose the Delivery Tab
Click Advanced

Do you have a Smart host set?

If you do then the SMTP server cannot find the Smart Host to deliver the messages to.
If you dont then you probably have a DNS resolution problem or a firewall issue

Here is a brief descriptioin of the two options for delivery of mail:

Smart Host
This setting tells the server to send all mail to another SMTP server.  So if you have an email account with your ISP then they generally give you an SMTP Address for you to send mail to, you could use this address for the Smart Host, in which case all outbound mail gets sent to that server for delivery onwards.

Direct Delivery
With this option your SMTP server delivers mail directly to the SMTP Server resposible for the domain the mail message is getting sent to.  What it does is looks up who is the responsible mail server for the domain and sends the mail to that server.

Try the following articles:
HOW TO: Configure the SMTP Virtual Server for Message Delivery
http://support.microsoft.com/default.aspx?scid=kb;en-us;303734&Product=iis50

HOW TO: Test the Windows 2000 SMTP Service Outbound Mailflow Without Using DNS
http://support.microsoft.com/default.aspx?scid=kb;en-us;297988
0
 
LVL 1

Author Comment

by:andrewaiello
ID: 19575747
Okay I will check that when I go home.    I just wiped this computer and am reinstalling everything from scratch; and i just downloaded the ISS and installed it; so i am figuring that I do not have a smart host set up.  
0
 
LVL 1

Author Comment

by:andrewaiello
ID: 19578733
If i don't have a smarthost set up should I try to set one up using the second link you posted?  Also, you mentioned possible firewall issues... do I have to punch a hole in my router and firewall for port 25?  Thanks.
0
 
LVL 14

Expert Comment

by:Scott Bennett
ID: 19578788
you will have to make sure your firewall is allowing it, and also (since this seems to be a home internet connection), You may want to check with your ISP and make sure they are allowing port 25 traffic through your internet connection. Many ISP's will block SMTP traffic on home internet connections to prevent spam.
0
 
LVL 1

Author Comment

by:andrewaiello
ID: 19580153
Okay, I checked and there is NO smart host set up.  When I hit the check DNS button in that panel; it checks out okay (domain name is valid).  I punched a port hole in my firewall and my router for port 25, but it still doesn't work. And again, strangely I am not seeing the mail go to he undelivered folder.  Thanks.  
0
 
LVL 14

Expert Comment

by:Scott Bennett
ID: 19582459
Have you tried setting up the smart host option? and have you contacted your Internet service provider to see if maybe they are blocking the SMTP traffic?
0
 
LVL 1

Author Comment

by:andrewaiello
ID: 19582504
I think I have optimum online; I'll give them a call when I go home.  Can i avoid the need for this if I setup a smarthost?  If so, how do I go about setting that up; do I need some other server or something (I don't know much about this stuff)?
0
 
LVL 14

Expert Comment

by:Scott Bennett
ID: 19582612
if you use smart host then you will need access to an smtp account on another server.
0
 
LVL 1

Author Comment

by:andrewaiello
ID: 19583069
Are there any free services that have this sort of thing (aol, gmail, etc)?
0
 
LVL 1

Author Comment

by:andrewaiello
ID: 19583247
I get the sneaking feeling that i may not be understanding the concept properly... if so I apologize for my idiocy.
0
 
LVL 14

Expert Comment

by:Scott Bennett
ID: 19603889
perhaps you should read through this 5 page tutorial on SMTP and IIS

http://www.windowsitlibrary.com/Content/141/09/1.html

0
 
LVL 1

Author Comment

by:andrewaiello
ID: 19604360
Thanks, I'll check that out.
0
 
LVL 1

Author Comment

by:andrewaiello
ID: 19609890
Okay, I read all that information and have a little bit clearer picture of whats going on; still trying to figure out how to proceed though.  It seems to set up a smart host it I would have to know the IP/DNS information of a dedicated smart host.  I am sure you can't just pick the IP address of any old one, its gotta be something you have access/rights to or whatnot: this is the thing I can't seem to find any information on; is it like, say if you had a working SMTP server on your computer; I would put the IP address of your computer in as my smart host and it would work (as in my SMTP would send emails to your SMTP which would then deliver them)?  I am assuming i would need some password or something for that to happen?  

Now, I'm not sure if I need a smart host, but either way it seems that because the mail is no longer appearing in the coldfusion undeliver folder i should check the logs of the SMTP server.  

Also, earlier you stated "just enter the username and password in the mail server settings like "user:password@127.0.0.1"    I didn't see where this (user/password) was applicable...maybe this is my problem; which field in which tab were you talking about?   Thanks.
0
 
LVL 1

Author Comment

by:andrewaiello
ID: 19617691
Changed the point value to 500 since this is more involved than I thought.
0
 
LVL 14

Expert Comment

by:Scott Bennett
ID: 19625781
you would use "user:password@127.0.0.1" in the coldfusion mail server setting if your email server required authentication.

What you need to do is check your SMTP server logs to see if you can find any reasons why your emails are not being sent. Also have you check with your Internet Service Provider as to weather they block SMTP from traffic?
0
 
LVL 1

Author Comment

by:andrewaiello
ID: 19626056
I have Optimum online; and I have been reading that they do in fact block port 25 (at least old news articles from 2004 said so).  Apparently you can pay 10 bucks a month to lift this restriction; no way!

I found this article though, which may help:  http://www.citidexliweb.com/help/CablevisionEmail.html

Is this equivalent to using optonline.net as a smart host?   I will try it when I go home; do you think this will work?  Thanks.
0
 
LVL 14

Accepted Solution

by:
Scott Bennett earned 2000 total points
ID: 19626102
its worth a try. I would just set your mail server in coldfusion administrator to mail.optonline.net and see what happens.
0
 
LVL 1

Author Comment

by:andrewaiello
ID: 19626126
Oh so i wouldnt even be using my ISS SMPT thing at all?  
0
 
LVL 14

Expert Comment

by:Scott Bennett
ID: 19626254
you may also want to set the mailerid in your cfmail tag to that of microsoft outlook. the default coldfusion mailerid is blocked by many anti spam mechanisms.

<cfmail mailerid=Microsoft Outlook, Build 10.0.34163
0
 
LVL 14

Expert Comment

by:Scott Bennett
ID: 19626273
If you can cut out the middle man by getting rid of the IIS SMTP service then that would be best just make sure you do the mailerid thing so your isp's SMTP server thinks you are sending it from outlook.
0
 
LVL 14

Expert Comment

by:Scott Bennett
ID: 19626283
looks like my quote got turned into a box... strange
0
 
LVL 1

Author Comment

by:andrewaiello
ID: 19626451
Lol;  thanks, I got a good feeling that this will work;  I'll keep you posted.  
0
 
LVL 1

Author Comment

by:andrewaiello
ID: 19629988
Grr.. still no luck.  I added that mailerID stuff to the cfmail tag and changed the mail server in coldfusion to optonline.net.   When that didn't work I tried mail.optonline.net and mail-hub.optonline.net (that people suggested on the net.  Still no go..
0
 
LVL 1

Author Comment

by:andrewaiello
ID: 19630353
The optonline website says the mail server is mail.optonline.net  but this gives me the following error:

"Error","scheduler-0","08/04/07","02:11:28",,"550 5.1.8 invalid/host-not-in-DNS return address not allowed "
0
 
LVL 14

Assisted Solution

by:Scott Bennett
Scott Bennett earned 2000 total points
ID: 19639416
This error means that the SMTP server does not like the return address that you are using. try using a valid email address in both the "to" and "from" fields. For example if you are using a test email address like:

<cfmail from="foo@foo.com"

then chane it to your real address.
0
 
LVL 1

Author Comment

by:andrewaiello
ID: 19639745
Ahh, i see.  Hopefully this means we are getting closer to getting it working then.    If i am getting this error instead of the other one it would suggest that the optonline mail server is functional, yes?   Thanks.

0
 
LVL 14

Expert Comment

by:Scott Bennett
ID: 19639787
yes, you are connecting to the SMTP server but it is set to prevent spammers from sending out emails so all your information needs to be legit.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One-stop solution for Exchange Administrators to address all MS Exchange Server issues, which is known by the name of Stellar Exchange Toolkit.
Are you an Exchange administrator employed with an organization? And, have you encountered a corrupt Exchange database due to which you are not able to open its EDB file. This article will explain all the steps to repair corrupt Exchange database.
The purpose of this video is to demonstrate how to set up a Mailchimp Template which will let the user create a uniform look for all of their campaigns. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mail…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question