javax.mail.MessagingException

Could not connect to SMTP host: usdc2spam2.slingmedia.com, port: 9000; nested exception is: java.net.ConnectException: Connection refused: connect


Samebug tips9

To restart the Selenium Webdriver mock browser in a testcase, first use 'driver.close()' and then reinstantiate the driver.

spring-data-redis requires redis 2.6+ to work properly.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.


Solutions on the web831

Solution icon of stackoverflow
Could not connect to SMTP host: usdc2spam2.slingmedia.com, port: 9000; nested exception is: java.net.ConnectException: Connection refused: connect

Solution icon of coderanch
via Coderanch by vijay Panner, 9 months ago
Could not connect to SMTP host: localhost, port: 25; nested exception is: java.net.ConnectException: Connection refused: connect

Solution icon of coderanch
via Coderanch by Harry Sunarsa, 1 month ago
Could not connect to SMTP host: smtp.gmail.com, port: 587; nested exception is: java.net.ConnectException: Connection refused: connect

Solution icon of googlegroups
Could not connect to SMTP host: localhost, port: 25; nested exception is: java.net.ConnectException: Connection refused: connect

Solution icon of oraclecommunity
via Oracle Community by 843834, 1 year ago
Could not connect to SMTP host: 161.85.104.5, port: 25 nested exception is: java.net.ConnectException: Connection refused: connect

Solution icon of oraclecommunity
via Oracle Community by 843830, 1 month ago
Could not connect to SMTP host: smtp.mail.yahoo.com.sg, port: 25; nested exception is: java.net.ConnectException: Connection refused: connect

Solution icon of oraclecommunity
via Oracle Community by 843830, 1 month ago
Could not connect to SMTP host: mail.x.com, port: 25; nested exception is: java.net.ConnectException: Connection refused: connect

Solution icon of stackoverflow
Could not connect to SMTP host: smtp.gmail.com, port: 465; nested exception is: java.net.ConnectException: Connection refused: connect

Solution icon of stackoverflow
Could not connect to SMTP host: smtp.gmail.com, port: 465; nested exception is: java.net.ConnectException: Connection refused: connect

Solution icon of coderanch
via Coderanch by Hasif Subair, 9 months ago
Could not connect to SMTP host: localhost, port: 25; nested exception is: java.net.ConnectException: Connection refused: connect

Stack trace

  • javax.mail.MessagingException: Could not connect to SMTP host: usdc2spam2.slingmedia.com, port: 9000; nested exception is: java.net.ConnectException: Connection refused: connect at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1934) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:638) 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 samples.SendMail.sendMail(SendMail.java:46) at samples.SendMail.main(SendMail.java:55) Caused by: java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(Unknown Source) at java.net.PlainSocketImpl.connectToAddress(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:288) at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:231) at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1900)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

2227 times, 2 minutes ago
Samebug visitor profile picture
Unknown user
2 times, 1 week ago
Once, 1 week ago
7 times, 2 weeks ago
11 times, 1 month ago
491 more bugmates