SSL Wrong Version when connecting to Azure's SMTP server

K. Kong 131 Reputation points
2024-02-22T10:00:07.3333333+00:00

I am trying out the Azure Email Service that is in public preview: https://learn.microsoft.com/en-us/azure/communication-services/concepts/email/email-smtp-overview

When trying to send a mail, I get:

connection encountered an error (C02723C52B7F0000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:355

What could be causing this error and how to rectify it? Could it be a wrong credential issue, but it looks like it hasn't reached the challenge stage.

My settings look pretty straightforward:

"smtp": {
    "host": "smtp.azurecomm.net",
    "user": "smtp-app|3.......c|c.......a",
    "password": "Z..,.X",
    "ssl": true,
    "port": 587
   }
Azure Communication Services
Azure Communication Services
An Azure communication platform for deploying applications across devices and platforms.
1,046 questions
0 comments No comments
{count} votes

Accepted answer
  1. Grmacjon-MSFT 18,821 Reputation points
    2024-02-23T00:30:20.32+00:00

    Hello @K. Kong
    Thanks for brining this to my attention.

    The SSL: WRONG_VERSION_NUMBER error means a mismatch between the SSL/TLS versions supported by the client and the server. In your case, it seems like there might be an issue with the SSL configuration in your SMTP settings.

    The first thing I would look into the SSL setting. You have SSL set to true in your SMTP settings. However, port 587 is typically used for StartTLS, which begins with an insecure connection that is upgraded to a secure connection using TLS. If the server is expecting a plain text connection which will then be upgraded to SSL/TLS via the STARTTLS command, this could be causing the issue. You might want to try setting "ssl": false and see if that resolves the issue.

    The second thing to look into, is the port number. The port number you’re using (587) is typically associated with StartTLS, as mentioned above. If you want to use SSL/TLS from the start of the connection, you might want to try using port 465 Lastly, check your credentials. While the error message suggests an issue with the SSL/TLS version, it’s always a good idea to double-check your credentials. Make sure the "user" and "password" fields in your SMTP settings match the credentials provided by Azure Communication Services

    If you have further questions, please let us know.

    -Grace


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.