从 AWS EC2 实例发送电子邮件(必须使用 SES?) [英] Send emails from AWS EC2 instance (SES mandatory?)

查看:29
本文介绍了从 AWS EC2 实例发送电子邮件(必须使用 SES?)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写这篇博文只是想看看我能否就 AWS EC2 实例中的电子邮件发送概念获得一些说明.

I write this post just to see if I can get some clarifications regarding email sending concepts in an AWS EC2 instance.

这与另一个帖子有关 Rails 不在 AWS 上发送电子邮件

This is related with this other post Rails does not send emails on AWS

我正在开发一个向客户发送电子邮件(例如确认或信息电子邮件)的 Rails 应用程序.

I´m developing a Rails application that sends emails to customers (such as confirmation or information emails).

我不知道到底哪个电子邮件服务在使用 Rails.我没有安装任何特定的 gem.但是邮件在开发环境(Ubuntu)中发送的很完美.

I dont know exactly which email service is using Rails. I didn´t install any particular gem. But the emails are been sent perfectly in development environment (Ubuntu).

当我部署到我的生产环境(AWS EC2 实例)时.此功能不起作用.您可以在我上面提供的帖子中查看错误详细信息.该错误与某些smtp connection denied有关.

When I deploy to my production environment (AWS EC2 instance). This functionality is not working. You can see the error details in the post I provided above. The error is related with some smtp connection refused.

所以,我已经阅读了一些其他帖子,但我很困惑.是否必须使用 AWS SES 服务才能从 EC2 实例发送电子邮件?或者它只是与安全凭证相关的问题(也许我只需要打开 smtp 25 端口).我需要安装任何电子邮件客户端或服务器吗?

So, I have read some other posts but Im confused. Is it mandatory to use the AWS SES service in order to send emails from EC2 instance? Or it is just a problem related to security credentials (maybe I just need to open the smtp 25 port). Do I need to install any email client or server?

推荐答案

从 EC2 实例发送电子邮件受到 Amazon 的限制,并在网络级别受到严格限制.这是为了防止垃圾邮件和其他滥用行为.

Sending emails from EC2 instances is limited by Amazon and strictly throttled at network level. This is to prevent spamming and other abuses.

如果您有大量电子邮件要发送给客户,推荐的方法是使用 Amazon Simple Email Service.借助 Amazon SES,您可以发送交易电子邮件、营销信息或任何其他类型的高质量内容,并且只需为使用的内容付费.

If you have a large amount of emails to send to your customers, the recommended way is to use Amazon Simple Email Service. With Amazon SES, you can send transactional email, marketing messages, or any other type of high-quality content and you only pay for what you use.

如果您确实需要从 EC2 实例发送电子邮件,则必须使用弹性 IP 地址并要求亚马逊的支持人员取消对来自该 EIP 的 SMTP 流量的限制.联系我们的表格可在 https://portal.aws.amazon.com/gp/aws/html-forms-controller/contactus/ec2-email-limit-rdns-request(需要认证)

If you really need to send emails from an EC2 instance, you must use an Elastic IP Adress and ask Amazon's support to remove limitations on SMTP traffic from that EIP. The form to contact us is available at https://portal.aws.amazon.com/gp/aws/html-forms-controller/contactus/ec2-email-limit-rdns-request (authentication is required)

塞布

这篇关于从 AWS EC2 实例发送电子邮件(必须使用 SES?)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆