Using Simple Email Service via SMTP

0

I need to send email from my EC2 Instance but External SMTP Connection is locked by AWS.

For this reason I'm studing AWS Simple Email Service. I'd like integrate this service using SMTP, not REST API.

I tried to send a test email using my email account as destination but I receive an error. I'm usind PHP SDK.

2024-02-29 14:42:49 SMTP INBOUND: "554 Message rejected: Email address is not verified. The following identities failed the check in region US-EAST-1: mydestination@gmail.com, MGDLab SES Test <mysender@mydomain.it>, mysender@mydomain.it" 2024-02-29 14:42:49 SERVER -> CLIENT: 554 Message rejected: Email address is not verified. The following identities failed the check in region US-EAST-1: mydestination@gmail.com, MGDLab SES Test <mysender@mydomain.it>, mysender@mydomain.it 2024-02-29 14:42:49 SMTP ERROR: DATA END command failed: 554 Message rejected: Email address is not verified. The following identities failed the check in region US-EAST-1: mydestination@gmail.com, MGDLab SES Test <mysender@mydomain.it>, info@mgdlab.it 2024-02-29 14:42:49 SMTP Error: data not accepted. An error occurred. <strong>SMTP Error: data not accepted.</strong><br />

In my business logic I don't know all destinations. I can't register them.

Please help me to understand

luk3tt0
asked 2 months ago82 views
2 Answers
2
Accepted Answer

I need to send email from my EC2 Instance but External SMTP Connection is locked by AWS.

You can unblock this port using this form. https://aws-portal.amazon.com/gp/aws/html-forms-controller/contactus/ec2-email-limit-rdns-request

profile pictureAWS
EXPERT
David
answered 2 months ago
profile picture
EXPERT
reviewed a month ago
  • I don't know but AWS has rejected my SMTP unlock request

1

The error message you're receiving indicates that the email addresses you're trying to send to are not verified. In AWS SES, there are two types of environments: Sandbox and Production.

  1. Sandbox Environment: When your SES account is in the sandbox, you can only send emails to verified email addresses or domains. This is likely the reason you're encountering the error.

  2. Production Environment: To send emails to any address, you need to move your SES account out of the sandbox and into production. This requires submitting a request to AWS to increase your sending limits and remove the sandbox restrictions.

Since you mentioned that you can't know all destinations in advance, you'll need to move your SES account to the production environment. You can do this by following these steps:

  1. Sign in to the AWS Management Console and open the Amazon SES console.
  2. In the navigation pane, under Account Dashboard, choose Sending Statistics.
  3. Choose Edit your account details.
  4. Under Request production access, choose Request a Sending Limit Increase.
  5. Fill out the form, providing details about your use case, and submit the request.

Once AWS approves your request, you'll be able to send emails to any address without needing to verify each one.

profile picture
EXPERT
answered 2 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