javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465, response: -1

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Oracle Community by FIS, 1 year ago
Could not connect to SMTP host: smtp.gmail.com, port: 465, response: -1
via Google Groups by dotCMS newB, 7 months ago
Could not connect to SMTP host: smtp.gmail.com, port: 587; nested exception is: java.net.SocketException: Permission denied: connect
via Google Groups by Jeffrey Trimble, 3 months ago
Could not connect to SMTP host: dspace.maag.ysu.e du, port: 25; nested exception is: java.net.ConnectException: Connection refused
via Google Groups by Unknown author, 7 months ago
Could not connect to SMTP host: localhost, port: 25; nested exception is: java.net.ConnectException: Connection refused: connect
via Coderanch by Joseph Bashir, 1 year ago
Could not connect to SMTP host: mail.myserver.com, port: 25; nested exception is: java.net.ConnectException: Connection timed out
via Oracle Community by iKenny, 1 year ago
Could not connect to SMTP host: smtp.gsiorg.com, port: 465, response: -1
javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465, response: -1
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:996)
at javax.mail.Service.connect(Service.java:233)
at javax.mail.Service.connect(Service.java:134)
at javax.mail.Service.connect(Service.java:86)
at com.sun.mail.smtp.SMTPTransport.connect(SMTPTransport.java:104)

Users with the same issue

Once, 2 days ago
Once, 8 months ago
769 times, 1 year ago
4 times, 1 year ago
102 times, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.