While trying to use
Transport.send(message, addresses);
or transport.sendMessage(message, message.getAllRecipients());
while sending mail using java, the process never ends only when I provide wrong password for my attachment file.
Tried some solutions from below links but does not help: Link 1:
Interestingly, process hangs only when I am providing wrong password for the attachment. While it works when I provide correct password for the attachment. Attached file is from SFTP server. Using gmail SMTP account to send an email: Server domain: smtp.gmail.com Port: 465 Secure Connection: SSL
Anyone having any thoughts will be appreciated.