We are trying to configure email for the Core Service on a server hosted in AWS EC2.
We have the AWS SMPT sever setup with the below settings.
email-smtp.us-east-1.amazonaws.com
Port - have tried 25 also 587
Security - Have tried with StartTLS - accepted by AWS SMTP also 'None'
When attempting to send test emails getting the below exception in the core-service log
2023-07-17 19:40:11,166 ERROR [com.os.ecm.mail.MailManagerImpl] (default task-2) MessageError: Unable to send message. [jakarta.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 587;
nested exception is:
javax.net.ssl.SSLException: Unsupported or unrecognized SSL message]
Have tried this same setup using GMAIL SMTP on port 587 and having the same error.
I have verified connection to the SMTP server can be established using the below powershell command and result
PS C:\Windows\system32> Test-NetConnection -Port 587 -ComputerName email-smtp.us-east-1.amazonaws.com
ComputerName : email-smtp.us-east-1.amazonaws.com
RemoteAddress : 52.86.209.58
RemotePort : 587
InterfaceAlias : Ethernet 3
SourceAddress : 172.17.153.9
TcpTestSucceeded : True
PS C:\Windows\system32> Test-NetConnection -Port 587 -ComputerName smtp.gmail.com
ComputerName : smtp.gmail.com
RemoteAddress : 142.251.167.108
RemotePort : 587
InterfaceAlias : Ethernet 3
SourceAddress : 172.17.153.9
TcpTestSucceeded : True