How to get status of emails sent via Amazon SES - amazon-web-services

I want to ask some question related to AWS SES. Please help me with my queries.
As described in the above image that we need to pay $0 for the first 62000 emails if sending email
from ec2 hosted application. How does AWS SES know that i will send email from my ec2 instance hosted
application or from somewhere else or we need to code?
How can i get the list of emails that successfully send, which emails get bounces, complaints,
rejected? Mean i want a log of my sending emails. I do not want to login in AWS and watch dashboard multiple time.

It can detect sends from Amazon EC2 based on IP address range.
For detailed logs of email sends, see: Monitoring Your Amazon SES Sending Activity - Amazon Simple Email Service
There are options for Event messages and Notifications.

You can track the mail events with event publishing. Here is a post explaining how to: https://mailintel.io/resources/tracking-deliveries-opens-and-clicks-for-amazon-ses. If you don't want to build anything yourself, you can use mailintel.io. Gives you a detailed reporting dashboard.

Related

Amazon SES - notifications for email verification

We use Amazon's SES service, and have set up Topics and Subscriptions under SNS (Simple Notification Service) so that we get notification emails when an email is bounced or successfully delivered. That's all working fine.
We sometimes send emails via SES on behalf of one of our partners, and before we can do that we need to verify their email address. The process is that the system asks SES to send out a verification email to the person saying "Example.com wants to send emails on your behalf, is that ok?", with a link for them to click. If they click it, then that email is marked as Verified within SES, and we can use it as a from address.
What I can't work out is how to automate the process of knowing whether they've clicked the link yet. I can log in to the AWS dashboard, and go and look at the list of verified email addresses, but i'd like to make it an automated process.
What would be ideal is if it worked the same way as bounces & deliveries: that i set up a "Verification" topic, and subscribe to it so we get an email like we do with bounces and deliveries. Then, the scheduled job that deals with incoming email notifications can say "Aha, this is a verification email for foobar#example.com: I'll mark their account as 'ses-verified'".
Does anyone know if it's possible to set this up? All the docs on the SES site just talk about bounces, deliveries and complaints.
thanks, Max
You can use the GetIdentityVerification api call in the SES part of the awssdk:
https://docs.aws.amazon.com/ses/latest/APIReference/API_GetIdentityVerificationAttributes.html
You could do this in a serverless way by having a lambda function do the check, and expose the lambda as an API endpoint to your application (among other ways).
Alternatively you could just try to send a single test email to a test/internal email address and check if it gives you an error - if its not verified, it will return an error immediately when you try to do the send.
EDIT:
If you want to use the CLI instead:
aws ses get-identity-verification-attributes --identities "mailbox#thedomain.com"

How to check emails logs through AWS?

I have a Joomla website & it is configured to use AWS-SES for outgoing emails. Is there any way or logging by which I can check all outgoing emails from AWS/Joomla with minimum details like timestamp, sent to email id, subject.
Please let me know. Thanks
So while SES doesn't have any fully featured monitoring Suite, you can set SES up to deliver Delivery, Bounce and Complaint Notifications.
With these notifications, you can develop your own application or read the raw notifications that will show you what emails got delivered/bounced/complaints.
Full information on these notifications is available on the AWS Documentation:
http://docs.aws.amazon.com/ses/latest/DeveloperGuide/notifications.html
You can publish your email sending events to an Amazon Kinesis Data Firehose delivery stream. This will take metadata from your sent emails and write it to an S3 bucket, which should produce your desired log.
Amazon has a tutorial on implementing this process at the link below.
https://docs.aws.amazon.com/ses/latest/DeveloperGuide/event-publishing-kinesis-analytics.html

Amazon SES fails to deliver emails to office domains

I have an AWS SES application, which sends an email when an event happens. The mail deliver is successful when I send it to gmail. But, if I want to use my company domain address which is also verified by SES, I do not see any emails in my account. The confusion part is, the sender email (FROM) is my company domain address.
Simple way is to create a SNS subscription and a topic from Amazon console, if you are trying to send e-mails from you application you might have to see if your corporate SMTP server is able to recieve e-mails.
Another simple route is to use "sendgrid" service, this is a paid subscription and it is very easy to use.

How to implement inbound email on Amazon AWS?

I'm relatively new to AWS, but I am trying to figure out how to get AWS to receive emails. According this post How to configure email accounts like support#xyz.com or feedback#xyz.com on AWS SES only handles outbound email.
What I am hoping to achieve is the ability to filter aliases. For example, if the alias is "xyz12alias", then any email sent to "xyz12alias#mydomain.co", can see the email and process the content appropriately. Which in my case will be storing it in account associated with the filter.
Can anybody direct me to a strategy or service within AWS that would allow me to implement inbound email on Amazon AWS?
https://postmarkapp.com/inbound appears to give me what I want, but is there anything within the AWS framework itself? Are there alternate services to postmarkapp?
Thanks.
Amazon Simple Email Service just introduced incoming e-mail support:
https://aws.amazon.com/about-aws/whats-new/2015/09/amazon-ses-now-supports-inbound-email/
In addition to offering a scalable, cost-effective email-sending
platform, Amazon SES can now accept your incoming emails. You can
configure Amazon SES to deliver your messages to an Amazon S3 bucket,
call your custom code via an AWS Lambda function, or publish
notifications to Amazon SNS. You can also configure Amazon SES to drop
or bounce messages you do not want to receive. If you choose to store
your messages in Amazon S3, Amazon SES can encrypt your mail using AWS
Key Management Service (KMS) before writing it to the bucket.
You configure all of these actions by defining receipt rules, which
you set up by using the Amazon SES console or the Amazon SES API.
Receipt rules enable a single message to trigger multiple actions.
Your rules can be as broad or as specific as you choose because you
can configure them to apply to specific email addresses or entire
domains.
You can also use receipt rules to control which messages Amazon SES
can accept on your behalf. Another filtering method is to set up
custom IP address block lists and allow lists. If you know that you
don’t want to receive mail originating from a particular IP address
range, simply add it to your account's IP address block list. You can
also override block lists by adding IP address ranges to your allow
list, which provides fine-grained control over your inbound email
traffic.
You'd have to set up your own server; that's the way to handle it using AWS. They don't provide anything other than their bulk email delivery service. A few links below:
http://jeffreifman.com/how-to-install-your-own-private-e-mail-server-in-the-amazon-cloud-aws/
http://cerebellumstrategies.com/2012/04/15/amazon-linux-postfix-dovecot/
Update: there is now a solution available in AWS, as referenced in the comments below.
Still doesn't appear to be possible on SES. I'd recommend looking at Mandrill and Sendgrid though.
http://mandrill.com/features/
https://sendgrid.com/docs/API_Reference/Webhooks/parse.html
Here is how to use Amazon and any virtual server to deliver email from SES to a local IMAP account.
This plan is about stable operations: every step is under our control.
Have SES receive emails
And deliver to an S3 bucket and send notification to a SNS topic
Subscribe to that notification with HTTPS protocol
Use aws/aws-php-sns-message-validator and write a small PHP script to reveive notifications from SNS through HTTPS
SNS only sends messaged ID-s, put those in a file
Install incron on your server to start a shell script that downloads those messages from the S3 bucket by s3cmd and delivers to the local IMAP account by sendmail
Use any IMAP server, I use Courier IMAP
Read your messages with e.g. Rainloop webmail
Use SES also for sending outgoing emails
When using AWS SES inbound mail support, main challenge is that, it fits well for programmatic tasks, but hardly human readable since it receives in raw message delivered format.
You you can setup a S3 bucket, SNS Topic (Which could again links to Email, SMS & etc.), Lambda to forward the inbound mail with the same format it receives to take any programmatic actions based on the content of the email.
If you want read the message in human readable format, you need to write your own code to do the formatting. For example using Serverless lambda SES forwarder includes, NodeJS code runs in Lambda to convert raw email to human readable format and forward to recipient email.

What is the difference between sendmail and Amazon SES on Ec2

I am confused with sending emails on Ec2.
i want to know why would we need SES if we can send emails using sendmail like we normally use in VPS servers.
Whats the benefit of that. Am i missing something
There isn't much difference if you are sending only few emails. But if you are sending many emails daily like user notifications, promotion etc then amazon doesn't like then being send from EC2.
Bulk emailing might get ec2 ip ranges blacklisted I guess, so when you send bulk emails from EC2, AWS will issue a notice. I have seen that when I had some configuration issue with my script and send a few hundred email in a very short period.
Amazon provides a way to remove these limitation on EC2 by submitting a request through the link given below
https://portal.aws.amazon.com/gp/aws/html-forms-controller/contactus/ec2-email-limit-rdns-request
You might have to setup elasticips for the EC2 instances, DKIM signing mechanism, SPF record, antispam, TLS etc.
Sending email using AWS SES apis are very easy (atleast from my point of view) compared to the above config and if you are a EC2 user then SES is available free of charge.