aws-doc-sdk-examples icon indicating copy to clipboard operation
aws-doc-sdk-examples copied to clipboard

[Bug]: pinpoint_send_email_smtp shuld set tls1.2<DESCRIPTIVE TITLE HERE>

Open tianchenkou opened this issue 3 years ago • 2 comments

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

tianchenkou avatar Oct 20 '23 10:10 tianchenkou

add code props.put("mail.smtp.ssl.protocols", "TLSv1.2"); might solve the problem

tianchenkou avatar Oct 20 '23 10:10 tianchenkou

Thanks, @tianchenkou. I'm assigning this to our Java developer to take a look.

cpyle0819 avatar Oct 23 '23 13:10 cpyle0819