SMTP with SSL failing

SMTP connection to Azure SMTP with SSL throws an error:

  1. exec command error: request to pd server code 500 error: 08B21A9C627F0000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:…/deps/openssl/openssl/ssl/record/ssl3_record.c:354:

Azure communication service requires SSL for standard SMTP connection.
Is it a bug, or I am doing something wrong.

Hello, we have investigated the issue

Please try setting Use Secure Connection (TLS) to False in your connection settings

Based on our tests, this should resolve the problem

Here is the detailed documentation on the transport protocol:
SMTP Transport Protocol Documentation

1 Like

Hi,

Unable to connect with or without Explicit TLS set to True

Azure states (How to create authentication credentials for sending emails using SMTP - An Azure Communication Services Quickstart)

While StartTLS is enabled, you have to explicitly send ssl flag:

$SmtpServer = “smtp.azurecomm.net
$SmtpPort = 587
$From = “[email protected]
$To = “[email protected]
$Credentials = Get-Credential -Message “SMTP Relay credentials” -UserName “smtprelay-service.########.##########”
$Subject = “This is a test message”
$Body = “This is a test message body”
Send-MailMessage -Verbose -SmtpServer $SmtpServer -Port $SmtpPort -UseSsl -Credential $Credentials -From $From -To $To -Subject $Subject -Body $Body

If you send it without -UseSsl it fails with the same error:

Send-MailMessage : Error in processing. The server response was: 5.7.3 STARTTLS is required to send mail
At C:\Temp\Untitled1.ps1:14 char:1
+ Send-MailMessage -Verbose -SmtpServer $SmtpServer -Port $SmtpPort -Cr …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.Mail.SmtpClient:SmtpClient) [Send-MailMessage], Smt
pException
+ FullyQualifiedErrorId : SmtpException,Microsoft.PowerShell.Commands.SendMailMessage

Which is looks similar to what I ger from the scenario:

  1. exec command error: request to pd server code 500 error: Invalid login: 535 5.7.3 Authentication unsuccessful

Hi Ivan,

Sorry for the delayed response. I tested the SMTP node multiple times, and everything is working correctly. I wasn’t able to reproduce your error, so it’s possible there might be an issue with how the fields were filled out. Could you please share a link to your unsuccessful attempts? We will examine the logs in detail to determine what went wrong.


Please send me a direct message with a link to the scenario (or the run from your history) and the email address associated with your Latenode account.


I also want to point out the recommended settings for smtp.azurecomm.net when using port 587. In the screenshot, you can see the following fields:

  • Use Explicit TLS: true
  • Use Secure Connection (TLS): false
  • Reject Unauthorized Certificates: false (or true if you’re using trusted certificates from a recognized Certificate Authority)

Azure Communication Services requires STARTTLS on port 587, which is why Use Explicit TLS must be set to true. If Use Secure Connection (TLS) is set to true, the client will attempt implicit TLS, which the server does not support.


Thank you for your patience!

Thank you.

It is working now …

100% was the issue on my end, I just do not know what it was. Tried just now and email were sent successfully!

I’m glad everything worked out!
Feel free to reach out if you have any questions :pray:

This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.