our customer recently disabled tls and tls11 at his email server. Beforehand, we send mails via SMTP STARTTLS connection on port 25:
var mmsg = MailMessage.load(file);
var client = new SmtpClient();
client.setHost(r.smtp);
client.setSecurityOptions(SecurityOptions.SSLExplicit);
client.setUseAuthentication(true);
client.setPort(r.port);
client.setUsername(r.username);
client.setPassword(r.pw);
client.send(mmsg);
This configuration worked well until last week. Now, we are forced to use tls12. But at this point, we see through wireshark that aspose still uses tls, even though we changed our code to (port 465):
var mmsg = MailMessage.load(file);
var client = new SmtpClient();
client.setHost(r.smtp);
client.setSecurityOptions(SecurityOptions.SSLImplicit);
client.setUseAuthentication(true);
client.setPort(r.port);
client.setUsername(r.username);
client.setPassword(r.pw);
client.supportedEncryption = EncryptionProtocols.Tls12;
client.send(mmsg);
The handshake is still performed with tls and therefore triggers a timeout error (the server does not answer). Whereas openssl manages to negotiate with tls12 and enables us to send mails via smtp access. Furthermore, openssl is also not able to connect with tls11 or tls. It shows the exact same behaviour as our java code. Which confirms that the customer disabled tls and tls11 and forces us to use tls12.
You need to use java file io to load a random msg file (row 3). The customer uses template mails to send them from our application to the smtp server. Wireshark shows, that the tls negotiation happens before auth login with username and password (at least with openssl). Therefore, I anonymised both.
I have observed the issue shared by you and have created an investigation ticket with ID EMAILJAVA-34562 in our issue tracking system to investigate this on our end. I will share the feedback with you in this regard as soon as possible.
I like to inform that issue is pending for detail investigation. I also like to inform as per our company policy, the first priority for investigation and resolution of issues is given to the Paid Support i.e. Enterprise and Priority Support on first come first serve basis. After that the issues from normal support forum are scheduled for investigation on first come first serve basis. I request for your patience. We will share good news with you soon regarding your issue.