SES and Port 25 for EC2 PHP Web App

0

I have moved a small web app to AWS EC2 where I am continuing to develop it. One of the requirements of the web app is that it needs to be able to send emails. I have been trying to use SES to achieve this.

I think that the best way forward for me will be to access the SES SMTP interface from my app with PHPMailer. The AWS documentation, "Sending emails programmatically through the Amazon SES SMTP interface" (https://docs.aws.amazon.com/ses/latest/dg/send-using-smtp-programmatically.html) which explains how to do this contains the following:

Amazon Elastic Compute Cloud (Amazon EC2) restricts email traffic over port 25 by default. To avoid timeouts when sending email through the SMTP endpoint from Amazon EC2, you can request that these restrictions be removed.

I followed the instructions to remove the block on port 25 for my EC2 instance and the next day I received an email from Amazon saying they were unable to process the request at this time. The email did not say that it was in response to my request to remove the block on port 25 but I think it must be. I think my request failed because the use case I submitted was written before I had seen some AWS guidelines for writing a use case and consequently I left out some points. At the moment I am more concerned with what the email went on to say:

please consider looking into the Simple Email Service. https://aws.amazon.com/ses/

This made me think that SES would be a valid option even if you can not remove the block on port 25. I found this rather confusing in view of the documentation I quoted earlier which seems to imply that you do need to remove the block on port 25 in order to be able to use SES.

I would be very grateful if someone could help me to understand this situation so that I can move forward with developing my web app.

Here is part of the email I got from Amazon:

Hello,

Thank you for submitting your request to have the email sending limit removed from your account and/or for an rDNS update.

This account, or those linked to it, have been identified as having at least one of the following:

  • A history of violations of the AWS Acceptable Use Policy
  • A history of being not consistently in good standing with billing
  • Not provided a valid/clear use case to warrant sending mail from EC2

Unfortunately, we are unable to process your request at this time, please consider looking into the Simple Email Service. https://aws.amazon.com/ses/

1回答
2
承認された回答

Is there any limitation from your side for using other port such as 587 for emails? The documentation also suggests to use port 587 to circumvent around port 25 limitation.

profile pictureAWS
回答済み 2年前
profile pictureAWS
エキスパート
Chris_G
レビュー済み 2年前
  • Thank you. I must have missed that. I know very little about this. What are the pros and cons of using 587 compared to 25?

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ