UPDATE:
I used Jamie's basic code with my personal settings and ran several
tests.
I'm no Java/J2EE expert, but it definitely appears to be bug with the
Railo v3.1/Glassfish v3/JDK combination. Which one is at fault? I
really can't answer that one.
I do not believe this is a gmail issue.
It would be a shame if Railo won't work with Glassfish v3, but I'm
inclined to think that this is a Glassfish problem. Someone with
better Java skills may shed some light here.
Here are my findings:
Tests
1: port 465, SSL enabled
2: port 587, TLS enabled
3: port 465, SSL and TLS enabled
All using spoolenable="false" and <cfmail> wrapped with <cftry> so I
can see the results on screen.
******************************************************************************************
Ubuntu/Railo v3.1/Glassfish v3/SUN jdk 1.6.0_07 (from Ubuntu
repository)
******************************************************************************************
1: fail
2: fail
3: fail
These fail immediately. They appear to fail before even contacting
gmail.
I also did a 4th test for this one with no security settings to a
localhost Postfix server. It works fine.
Top portion of stack traces:
465 at
railo.runtime.net.smtp.SMTPClient._send(SMTPClient.java:724):724 at
railo.runtime.net.smtp.SMTPClient.send(SMTPClient.java:626):626 at
railo.runtime.tag.Mail.doEndTag(Mail.java:480):480 at
smtp.gmail.com Could not convert socket to TLS at
railo.runtime.net.smtp.SMTPClient._send(SMTPClient.java:724):724 at
railo.runtime.net.smtp.SMTPClient.send(SMTPClient.java:626):626 at
railo.runtime.tag.Mail.doEndTag(Mail.java:480):480 at
******************************************************************************************
Ubuntu/Railo v3.1/Glassfish v2.1/SUN jdk 1.6.0_07 (from Ubuntu
repository)
******************************************************************************************
1: success
2: success
3: success
Now this is interesting! It works! This Ubuntu VM is virtually
identical to the VM with Glassfish v3 except for the Glassfish
version.
******************************************************************************************
Win Vista/Railo Express v3.1
******************************************************************************************
1: success
2: success
3: success