Mail Service Issue

I am having an issue with mail in production. I tried just sending a straight cfmail from/to and the email was sent just fine. When ever one of my notifications go out from my new application the email gets put in the undelivered folder. If I look at the logs I see an exception reading message? (see attachment 1) and If I look at the message it looks like its trying to use even though I have set 465 as the outgoing port. Any ideas?

Where did you set the port? Did you set it in the payload or in your mail settings structure in your config?

Luis F. Majano
Ortus Solutions, Corp

ColdBox Platform:
Linked In:
IECFUG Manager:


This is just set in my server settings. Do I need to set this up in Coldbox?


From memory, as I haven’t looked into the plugin code for sometime.

If you don’t define the settings in ColdBox then it uses the CF server settings, you might need to double check your config as it might just have some default info there.

The server is sending mail fine, that is the right info. Let me double check this plugin, maybe it uses 25 by default

Yep…that is the issue, if you don’t specify a setting it defaults to 25 and that is why my mail is not getting set. I will try and set the mail settings in the config and see if that does the trick.

Nope, still not getting sent… Exception reading response

I thought maybe it was a firewall issue so I opened up 465 outbound just to be safe but email is sending from the www side using the same settings just fine.

Is that what shows in the mail logs?

If that is the case then you are trying to send mail out through gmail / google apps and you have reached your limit on the sending of mail.

This is the error I am getting…weird because the verify connection works. I know nothing about mail though haha

“Error”,“scheduler-0”,“01/13/12”,“21:20:21”,“Exception reading response”
javax.mail.MessagingException: Exception reading response;
nested exception is: Unrecognized SSL message, plaintext connection?
at com.sun.mail.smtp.SMTPTransport.readServerResponse(
at com.sun.mail.smtp.SMTPTransport.openServer(
at com.sun.mail.smtp.SMTPTransport.protocolConnect(
at javax.mail.Service.connect(
at coldfusion.mail.MailSpooler.getConnection(
at coldfusion.mail.MailSpooler.deliver(
at coldfusion.mail.MailSpooler.sendMail(
at coldfusion.mail.MailSpooler.deliverStandard(
Caused by: Unrecognized SSL message, plaintext connection?
at com.sun.mail.util.LineInputStream.readLine(
at com.sun.mail.smtp.SMTPTransport.readServerResponse(
… 10 more

If I just drop in a plain old cfmail on the server it works fine

this is a test to make sure the server is sending mail properly using the default server

another twist… error emails via logbox are getting sent just fine…


This message is received from ColdFusion because when you try to send through the gmail network, you have exceeded your daily limit of emails, or you are relaying email through the gmail network.

I went through this with a client recently, if you google this error message you will get a number of different scenarios, but I can tell you from first hand that as soon as I switched this over to a mail server with no limitations this error went away.

You will also find that all these email will be stored in the mail->undelivr folder as well.

This has to be a Coldbox issue right? I am really confused on how to debug this…anyone got an idea?

No Dan, this is a Gmail or mail server issue.

Try getting a copy of wireShark and watch the ports for mail, and look at the handshakes/requests between the servers.

As I stated this error is generally occurring because gmail or your mail server, has rejected relaying emails. Which is why the other email address you used actually works.

Gmail is very fussy when it comes to mail relays and will only allow you to send so many a day, before it stops responding, and why you see these type of messages in the logs. Other mail servers like yahoo might do the same thing.

Andrew -
What I was saying though is I sent an email using cfmail that uses the same from/to and uses gmail server settings from ColdFusion admin to send the email. I also use these same settings on the front end of the website to send email from a Mura website. This is why I don’t think its a Gmail issue.

Hi Dan,

The stack trace you post seems to be throwing an SSL related exception.

is UseSSL flag being set anywhere in your application before the mail is dispatched, either in the service or in the payload?


p.s. if you’re using the latest ColdBox build I’d perhaps recommend looking at postmarkapp and the protocol that comes bundled, skips the whole cfmail affair :slight_smile:


Well then it sounds like that is a different issue then, have you tried logging / step debugging the sending of the email? I came to the conclusion as you added in another post that you tried a different email etc and it worked fine, but you didn’t add if you used a different sender name or server name.

All I can say is that the log message for no response in the mail log, is indeed a message that is always seen when you exceed your daily sending limits for mail relays.

As to your problem, my guess is that the config settings aren’t getting picked up, or the application hasn’t been reinit’ed to pick them up. Logging the details or step debugging into the code and inspecting the values would determine this further I would suspect.

I use this all the time with sending emails and have no problems with it.

@Robert - That was my thought to so I setup useSSL = true in my mail settings in my config. I will take a look at the latest build and see if its something I can use.

@Andrew - I will setup these mail parameters locally and see if I can figure out the problem, thanks!

Postmark API looks pretty cool, has anyone used it before? Thoughts? Doesn’t seem like it will cost that much so its an option. From the documentation it looks like all I need to do is add a protocol and apikey to my mail settings, nice!

mailSettings = {
        apikey = "123456789"