aws-doc-sdk-examples
aws-doc-sdk-examples copied to clipboard
[Bug]: pinpoint_send_email_smtp shuld set tls1.2<DESCRIPTIVE TITLE HERE>
Expected behavior
I want to use SMTP to send emails, and I found this example, but it shows the error message 'Could not convert socket to TLS'
Actual behavior
Error message: Could not convert socket to TLS
Steps to reproduce
1.Copy this code: https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/java/example_code/pinpoint/pinpoint_send_email_smtp.java
2.change own environment
3.run it
Logs / stacktrace (if applicable)
No response
Which SDK were you using?
Java
Which OS were you using?
Windows
SDK version
Jdk1.8.0_271
OS version
Windows10
add code props.put("mail.smtp.ssl.protocols", "TLSv1.2"); might solve the problem
Thanks, @tianchenkou. I'm assigning this to our Java developer to take a look.