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/

已提問 2 年前檢視次數 361 次
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?

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南