Created
February 11, 2011 21:57
-
-
Save teeparham/823124 to your computer and use it in GitHub Desktop.
AWS SES - with display from
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| gem install aws-ses | |
| # in irb: | |
| require 'aws/ses' | |
| ses = AWS::SES::Base.new :access_key_id => "your-key", | |
| :secret_access_key => "your-secret-key" | |
| ses.addresses.list.result | |
| => [] | |
| ses.addresses.verify '[email protected]' | |
| # check your email & confirm | |
| ses.addresses.list.result | |
| => ["[email protected]"] | |
| ses.send_email :to => '[email protected]', | |
| :source => '[email protected]', | |
| :subject => 'from SES', | |
| :text_body => 'this is a test' | |
| # now let's use a nice from address | |
| ses.send_email :to => '[email protected]', | |
| :source => '"John Smith" <[email protected]>', | |
| :subject => 'from SES', | |
| :text_body => 'this is a test' | |
| # it works! check your email from "John Smith" | |
| => #<AWS::SES::SendEmailResponse:0x2155502760 200 OK> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment