AWS SES very long delivery time

0

I am using SES to send emails from an EC2 instance. Sometimes, the emails cannot be received by users within 10 minutes. At other times, the emails can be received in 3 seconds. The code I use to send emails is shown below. Why does the delivery time of SES vary so much?

public void sendEamilBySES(String email,String subject,String code){
        AmazonSimpleEmailService client = emailClientBuilder();
        SendEmailRequest request = new SendEmailRequest()
                .withDestination(
                        new Destination().withToAddresses(email))
                .withMessage(new Message()
                        .withBody(new Body()
                                .withText(new Content()
                                        .withCharset("UTF-8").withData(code)))
                        .withSubject(new Content()
                                .withCharset("UTF-8").withData(subject)))
                .withSource("dreamease.noreply@gmail.com");

        client.sendEmail(request);
    }
2 Answers
2

Hello.

It is difficult to pinpoint the reason for the delay in email delivery as there are multiple reasons.
Therefore, I recommend that you first check to see if there are any problems from the three viewpoints introduced in the blog below.
https://aws.amazon.com/jp/blogs/messaging-and-targeting/three-places-where-your-email-could-get-delayed-when-sending-through-ses/

profile picture
EXPERT
answered 3 months ago
profile picture
EXPERT
reviewed 3 months ago
1

I also can't say what the specific issue might be in your case, but I'd suggest double-checking that your DKIM, SPF, and DMARC records in DNS are exactly correct. I'd also suggest sending test messages to your own mail addresses in mainstream email services, such as Gmail and Outlook.com, and checking that the headers that you can see in the "original message" view show completely clean results for DKIM, SPF, and DMARC.

Spurious delivery issues that affect different recipients differently but often involve delays can be caused by antispam mechanisms, such as greylisting, where the recipient initially rejects the message with a "I'm busy, please try later" response and only accepts the message if it's retried a certain time later, which spammers haven't traditionally done, because of the generally low quality of their address registries.

Whether your emails are subjected to greylisting may depend on whether the SPF, DKIM, and DMARC anti-spoofing mechanisms are configured correctly, along with your general reputation as a sender. Also note that if you're sending emails with a new email address or even a new domain name, which hasn't previously been used to send emails at all or to the same recipients, it will take some time to earn a positive reputation for your sender addresses/domains.

EXPERT
Leo K
answered 3 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions