AWS SES and Sending email setting up

Tram Ho

What is AWS SES

SES stands for Simple Email Server, is a platform that allows sending and receiving email using email or domain

Used for sending marketing emails, notification emails in the system such as registration, newsletter, order info ..

Pricing

Refer to AWS SES pricing here https://aws.amazon.com/ses/pricing/

Prices depend on the region you choose, with the price as above, you can freely test and worry about being charged

If you deploy the application to EC2 (including Free Usage Tier) and send mail from there using SES, you can send up to 62k emails without charge

Compatible with other AWS services

  • Email from EC2 using AWS SDK
  • Compatible with AWS Elastic Beanstalk
  • Set up SNS to notify whether emails are not sent or have been successfully sent to the recipients
  • Control users’ access to email sending by IAM
  • Host email on S3 service
  • Email trigger using AWS Lambda
  • Put sending email event to Amazon Cloudwatch

Send email from EC2 and SES applications

The first thing to use SES or any AWS service is that you need an AWS account. Refer here https://docs.aws.amazon.com/ses/latest/DeveloperGuide/sign-up-for-aws.html

Create a smtp setting

  1. Access to ses service select region
  2. Select SMTP settings
  3. And click the create button “Create my SMTP credential” button
  4. SES will create an IAM user for authenticate, to default to click create
  5. Get the credential information from the csv file you got from step 2 fill in the smtp settings in your application

To send an email you need to setup and validate an email

Verify email

  1. Access SES service
  2. Click Email Address menu
  3. Click Verify new email button, enter your email address
  4. An AWS SES message will send you an email confirmation for authentication, go to the mail box and click on the confirm link
  5. After clicking on the confirmation email link that AWS sends you your email will be verified

So the installation steps have been completed, your application is ready to send email to anywhere with the sender as the email you have just verified.

Sanbox limitation

By default, your SES service account will be in Sandbox mode and your sandbox account is limited

  • Sending quota: 200 emails / day
  • Max send rate: 1 email / s

To send more emails you need to request out of the sandbox into the product environment

Detail https://docs.aws.amazon.com/ses/latest/DeveloperGuide/request-production-access.html

Refer

https://docs.aws.amazon.com/ses/latest/DeveloperGuide/Welcome.html

Share the news now

Source : Viblo