Skip to content

Instantly share code, notes, and snippets.

@nagataka
Created February 12, 2015 01:53
Show Gist options
  • Select an option

  • Save nagataka/56e27a8a81d6192fd0bf to your computer and use it in GitHub Desktop.

Select an option

Save nagataka/56e27a8a81d6192fd0bf to your computer and use it in GitHub Desktop.
send message by AWS SES using AWS SDK for PHP 1
#!/usr/bin/php
<?php
require_once("sdk-1.6.2/sdk.class.php");
$ses = new AmazonSES();
$response = $ses->send_email(
'from_addr@example.co.jp', // Source (aka From)
array('ToAddresses' => array( // Destination (aka To)
'to_adde@test.com'
)),
array( // Message (short form)
'Subject.Data' => 'Email Test ' . time(),
'Body.Text.Data' => 'This is a simple test message ' . time()
)
);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment