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?

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠