我正在尝试使用Meteor软件包来连接tarang:email-ses由@Akshat构建的AWS SES .
我正在使用在AWS EC2实例上运行的Meteor @ 1.*.当我使用下面的代码运行测试时,没有发送任何电子邮件.
我已经设置了AWS访问密钥ID和秘密访问密钥,并在此处使用它:
Meteor.startup(function () {
Email.configSES({
AWSAccessKeyID: 'access-key',
AWSSecretKey: 'secret-key'
});
});
Run Code Online (Sandbox Code Playgroud)
我还验证了我的电子邮件和域名.在这里,我确保从我的经过验证的发件人SES地址发送:
Accounts.emailTemplates.from = 'Domain Name <support@domain-name.com>';
Run Code Online (Sandbox Code Playgroud)
然后在Meteor方法中,我创建一个新用户并发送和注册电子邮件(如果我部署到meteor.com,当然没有Accounts.emailTemplates.from):
if (Meteor.user() && adminUser(this.userId)) {
var accountId = Accounts.createUser({
'username': doc.name,
'email': doc.email
});
Accounts.sendEnrollmentEmail(accountId);
}
Run Code Online (Sandbox Code Playgroud)
为email-ses包设置的代码是否正确?
我认为这个包抽象出了Amazon SES API发送电子邮件(并允许本地Meteor电子邮件调用).是否需要在AWS上设置SMTP?
amazon-web-services amazon-ses meteor meteor-up meteor-accounts