Is there any other attribute / property I must define in order to enable SSL?

418 views

Hi,
I have a similar problem, my context was defined as:

<Resource
  name="mail/GanibSession"
  auth="Container"
  type="javax.mail.Session"
  mail.debug="true"
  mail.transport.protocol="smtp"
  mail.smtp.host="mail.mydomain.com"
  mail.smtp.auth="true"
  mail.smtp.port="465"
  mail.smtp.starttls.enable="true"
  mail.user="user@mydomain.com"
  password="mypasswd"
  mail.smtp.socketFactory.class="javax.net.ssl.SSLSocketFactory"
/>
 
My SMTP params require authentication and SSL on port 465, I think the problem could be the lack of SSL definition, I undersand this definition works for TLS, is there any other attribute / property I must define?
 
Thank you in advance, best regards.
Manuel
 
=======================
Caused by: com.ganib.notification.EmailException: The email could not be sent: javax.mail.MessagingException: Could not connect to SMTP host: mail.mydomain.com,
 port: 465, response: -1
        at com.ganib.notification.Email.send(Email.java:298)
        at com.ganib.notification.EmailDeliverable.deliver(EmailDeliverable.java:121)
        ... 81 more
Caused by: javax.mail.MessagingException: Could not connect to SMTP host: mail.mydomain.com, port: 465, response: -1
        at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1960)
        at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:642)
        at javax.mail.Service.connect(Service.java:317)
        at javax.mail.Service.connect(Service.java:176)
        at javax.mail.Service.connect(Service.java:125)
        at javax.mail.Transport.send0(Transport.java:194)
        at javax.mail.Transport.send(Transport.java:124)
        at com.ganib.notification.Email.send(Email.java:270)
        ... 82 more
2015-06-24 09:49:00,751 ERROR com.ganib.notification.Postman - Postman.deliver could not customise user and switch brand context: com.ganib.notification.DeliveryException: Error sending email

 

related to an answer for: SMTP Configutarion error..!!!!
asked Jun 24, 2015 by Manuel (120 points)
reshown Jun 29, 2015 by Ganib

1 Answer

0 votes

Hello,

It seems that your system is not allowed to connect SMTP port 465, if you are behind firewall/NAT you need to ask your administrator to allow SMTP SSL port for system,
Please verify your port using telnet command as below:



#telnet mail.mydomain.com 465

 

If your system allows to connect port the o/p will be as below:
 


Trying 74.125.68.108...
Connected to mail.mydomain.com.
Escape character is '^]'.


 

As well as please send us catalina.out file so we can check your issue in more details.

Thanks,

 

Jaclyn

Jaclyn N,
Ganib Support Team, Ganib Inc.
Free Signup | Free Download | Documentation
Skype ID: ganib.support
Email: support@ganib.com

 

answered Jun 29, 2015 by Jaclyn (18,310 points)
...