Hi@robinshen ,
Thank you for your response!!
As suggested above, we disabled option "Use SMTP over SSL" and enabled option "Enable Start TLS".
Getting error as below,
Caused by: org.apache.commons.mail.EmailException: Sending the email to the following server failed : mailhost.gmail.com:587
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1410)
at org.apache.commons.mail.Email.send(Email.java:1437)
at com.pmease.quickbuild.util.MiscUtils.sendMail(MiscUtils.java:129)
... 17 more
Caused by: com.sun.mail.util.MailConnectException: Couldn't connect to host, port: mailhost.gmail.com, 587; timeout 120000;
nested exception is:
java.net.UnknownHostException: mailhost.gmail.com
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2209)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:740)
at javax.mail.Service.connect(Service.java:366)
at javax.mail.Service.connect(Service.java:246)
at javax.mail.Service.connect(Service.java:195)
at javax.mail.Transport.send0(Transport.java:254)
at javax.mail.Transport.send(Transport.java:124)
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1400)
... 19 more
Caused by: java.net.UnknownHostException: mailhost.gmail.com
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:607)
at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:357)
at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:238)
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2175)
Can you please help here.
Thanks,
Debarati Mukherjee