Если вы используете AWS SDK для PHP для обработки всех низкоуровневых деталей, таких как подписание запроса, эта функция выполнит то, что вы пытаетесь сделать.
<?php
/**
* Send a plain-text email using Amazon SES.
*
* @link http://docs.amazonwebservices.com/AWSSDKforPHP/latest/#m=AmazonSES/send_email AmazonSES::send_email()
* @param string|array $to (Required) The email address(es) to send to. Accepts a string for one, or an array for multiple.
* @param string $from (Required) The email address of the sender.
* @param string $subject (Required) The subject of the email. US-ASCII characters only!
* @param string $message (Required) The plain-text email to send. US-ASCII characters only!
* @return boolean Whether the request was successful or not.
*/
function send_text_email($to, $from, $subject, $message)
{
$email = new AmazonSES(AWS_KEY, AWS_SECRET_KEY);
$response = $email->send_email($from, //Source (aka From)
array('ToAddresses' => $to), // Destination (aka To)
array( // Message (short form)
'Subject.Data' => $subject,
'Body.Text.Data' => $message
)
);
return $response->isOK(); // boolean
}
?>