AWS SES

1. Introduction

Amazon Simple Email Service (SES) is a cloud-based email service that provides cost-effective, flexible and scalable way for businesses of all sizes to keep in contact with their customers through email.

2. Reference

Amazon Simple Email Service

http://aws.amazon.com/ses/

Using the Amazon SES SMTP interface to send email

https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-email-smtp.html

Connecting to an Amazon SES SMTP endpoint

https://docs.aws.amazon.com/ses/latest/DeveloperGuide/smtp-connect.html

Amazon SES and security protocols

https://docs.aws.amazon.com/ses/latest/DeveloperGuide/security.html

Send an email using SMTP with Java

https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-using-smtp-java.html

How can I use Amazon SES to receive inbound emails, and then store those emails on Amazon S3?

https://aws.amazon.com/es/premiumsupport/knowledge-center/ses-receive-inbound-emails/

Configuring inbound rules on SES

https://dev.to/aws-builders/configuring-inbound-rules-on-ses-5fci

3. Verified indentities

3.1. Send test email

In the Amazon console, Amazon Simple Email Service (Amazon SES),

enter the chosen identity and find in the upper right corner the button "Send test email".


Me tests filling the form:

Scenario: Custom

Custom recipient: 

Subject: 

Body: 


Click "Send test email" button on the bottom of the form,

in a few minutes the email message should be received by the recipient.


3.2. Verified identities casuistic

While SES is in the sandbox mode, the following restrictions apply:

You can only send mail to verified email addresses and domains, or to the Amazon SES mailbox simulator.

You can send a maximum of 200 messages per 24-hour period.

You can send a maximum of 1 message per second.


When your account is out of the sandbox, you can send email to any recipient, regardless of whether the recipient's address or domain is verified. However, you still have to verify all identities that you use as "From", "Source", "Sender", or "Return-Path" addresses. 


4. Using the Amazon SES SMTP interface to send email

Requires client software that can communicate using Transport Layer Security (TLS):

[STARTTLS]

-on port 25, 587, or 2587.

-TLS 1.2, TLS 1.1, TLS 1.0 and SSLv2Hello.

[TLS Wrapper]

-on port 465 or 2465.

-TLS 1.2, TLS 1.1 and TLS 1.0.


See example at the reference 'Send an email using SMTP with Java'.

4.1. Update JavaMail library from 1.4 to 1.6 in order to support TLS 1.2

JavaMail 1.4 jar must use TLS 1.0 or 1.1

Update JavaMail library to at least 1.6 because this version already supports TLS 1.2


com.sun.mail : javax.mail : 1.5.6 (latest version for Java 5) doesn't support TLS 1.2

See [https://javadoc.io/doc/com.sun.mail/smtp/1.5.6/index.html]:

 -- STARTTLS support (mail.smtp.starttls.enable, to "true")

 -- Secure protocols

 -- Trusted Certificates

 -- Configuring Your Own Trust Manager (!!!!!!!!!!!!!!!!!!)


5. Receipt rule (Email receiving > Rule set)

Located a AWS "Amazon SES" > Configuration > Email receiving

See reference: "How can I use Amazon SES to receive inbound emails, and then store those emails on Amazon S3?" & "Configuring inbound rules on SES"


Note : The recipient have to belong to the domain owned by the same AWS account i.e the domain has to be verified on SES.

10. Troubleshooting

10.1. Amazon SES Delivery problems

https://docs.aws.amazon.com/ses/latest/dg/troubleshoot-delivery.html