SES client

This page contains some example usage for SES. There are other resources that explain authentication and configuration.

The SES package could be installed with Composer.

composer require async-aws/ses


Send a message

use AsyncAws\Ses\Input\SendEmailRequest; use AsyncAws\Ses\SesClient; use AsyncAws\Ses\ValueObject\Body; use AsyncAws\Ses\ValueObject\Destination; use AsyncAws\Ses\ValueObject\EmailContent; use AsyncAws\Ses\ValueObject\Message; $ses = new SesClient(); $result = $ses->sendEmail(new SendEmailRequest([ 'FromEmailAddress' => '', 'Content' => new EmailContent([ 'Simple' => new Message([ 'Subject' => 'New Invoice', 'Body' => new Body([ 'Text' => 'A new invoice is available', ]), ]), ]), 'Destination' => new Destination([ 'ToAddresses' => [''] ]), ])); echo $result->getMessageId();