Created
February 12, 2015 01:53
-
-
Save nagataka/76016715ee26e1161755 to your computer and use it in GitHub Desktop.
send message by AWS SES using AWS SDK for PHP 2
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
| #!/usr/bin/php | |
| <?php | |
| require 'AWS_SDK_PHP2/aws-autoloader.php'; | |
| use Aws\Ses\SesClient; | |
| $client = SesClient::factory(array( | |
| 'key' => "XXXXXXXXXXXXXXXXXXXX", | |
| 'secret' => "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", | |
| 'region' => "us-east-1" | |
| ) | |
| ); | |
| $result = $client->sendEmail(array( | |
| 'Source' => 'from_addr@example.co.jp', | |
| 'Destination' => array( | |
| 'ToAddresses' => array('to_adde@test.com') | |
| ), | |
| 'Message' => array( | |
| 'Subject' => array( | |
| 'Data' => 'this is SES test' | |
| ), | |
| 'Body' => array( | |
| 'Text' => array( | |
| 'Data' => 'this is test.' | |
| ), | |
| ), | |
| ) | |
| ) | |
| ); | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment