Created
February 24, 2012 08:06
-
-
Save okochang/1899052 to your computer and use it in GitHub Desktop.
awssdk for ruby send email
This file contains 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
# -*- coding: utf-8 -*- | |
require 'aws-sdk' | |
# ACCESS_KEYとSECRET_KEYを定義します | |
ACCESS_KEY = 'YOUR_ACCESS_KEY' | |
SECRET_KEY = 'YOUR_SECRET_KEY' | |
# AWSの認証を行い、テストメールを送信します | |
ses = AWS::SimpleEmailService.new(:access_key_id => ACCESS_KEY,:secret_access_key => SECRET_KEY) | |
ses.send_email( | |
:subject => 'A Sample Email', | |
:from => '[email protected]', | |
:to => '[email protected]', | |
:body_text => 'Sample email text.', | |
:body_html => '<h1>Sample Email</h1>') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment