Amazon Simple Email Service is highly scalable, cost effective bulk email sending service. In this article I will be explaining how to integrate Amazon SES into your existing applications built in PHP quickly.
- Sign up for Amazon SES
- Add a verified sender email id - Login to AWS Management Console, Add an emailid to the verified senders list. Email would be sent to the specified address and once verified the senders email id gets added.
- Once user gets added to senders list, you can send test mails to any valid email id using the AWS Console
- Request production access from here. Initially you will get a max Limit of 1000 mails per day and maximum of 1 email/second.
- Get AWS access keys - Go to http://aws.amazon.com, click Account, and then click Security Credentials. Navigate to the Access Credentials section of the page, and click the Access Keys tab.
- Download Amazon SES PHP class from here
- Sample PHP script which will send the email using Amazon SES
Thats it all set to send messages using Amazon SES.require_once('ses.php'); $ses = new SimpleEmailService('Access Key Here', 'Secret Key Here');$m = new SimpleEmailServiceMessage(); $m->addTo('recipient@example.com'); $m->setFrom('user@example.com'); $m->setSubject('Hello, world!'); $m->setMessageFromString('This is the message body.'); print_r($ses->sendEmail($m));
Pricing: Amazon charges $0.10 for 1000 messages and $0.12 per GB of attachments.
You can also request Amazon to increase the quota limits from here.
Hope that article was useful, See ya!!

0 comments:
Post a Comment