AWS SES with Meteor

前端 未结 2 1137
别跟我提以往
别跟我提以往 2021-01-22 07:20

I\'m trying to out a Meteor package to interface with AWS SES called tarang:email-ses built by @Akshat.

I\'m on Meteor @1.* running on a AWS EC2 instance.

2条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-22 07:47

    @brian-shamblen does not answer the question directly, but rather proposes an alternative solution to send emails.

    You do not have to set up SMTP on AWS, nor you need to set environment variable inside your project process.env.MAIL_URL.

    • Log into the AWS Management Console
    • Go to IAM Service (!!not SES)
    • Create new IAM User
    • Save credentials (AWSAccessKeyID and AWSSecretKey). These are the credentials you'll use in Email.configSES({...})
    • Create inline Policy for this user:
    {   
        "Version": "2012-10-17",
        "Statement": [
            {
                "Effect": "Allow",
                "Action": [
                    "ses:SendEmail",
                    "ses:SendRawEmail"
                ],
                "Resource": "*"
            }
        ]
    }
    
    • Make sure to use verified domail in Accounts.emailTemplates.from. In order to verify domain in AWS, go to SES services -> Domains and follow instructions.

    This should let you send emails.

提交回复
热议问题