'us-east-1','version'=>'latest','credentials' => array( 'key' => 'somekey', 'secret' => 'somekey' )); public function __construct() { // Construct the parent class //parent::__construct(); //echo "listAllBuckets"; $this->SES = SesClient::factory($this->ses_properties); //$this->verifyEmailIdentity(); } public function sendMail($email) { $sender_email = 'velmurugan.s@venbainfotech.com'; // Replace these sample addresses with the addresses of your recipients. If // your account is still in the sandbox, these addresses must be verified. $recipient_emails = [$email]; // Specify a configuration set. If you do not want to use a configuration // set, comment the following variable, and the // 'ConfigurationSetName' => $configuration_set argument below. //$configuration_set = 'ConfigSet'; $subject = 'SineEdge PD Test'; $plaintext_body = 'This email was sent with Amazon SES using the AWS SDK for PHP.' ; $html_body = '
This email was sent with '. 'Amazon SES using the '. 'AWS SDK for PHP.
'; $char_set = 'UTF-8'; try { $result = $this->SES->sendEmail([ 'Destination' => [ 'ToAddresses' => $recipient_emails, ], 'ReplyToAddresses' => [$sender_email], 'Source' => $sender_email, 'Message' => [ 'Body' => [ 'Html' => [ 'Charset' => $char_set, 'Data' => $html_body, ], 'Text' => [ 'Charset' => $char_set, 'Data' => $plaintext_body, ], ], 'Subject' => [ 'Charset' => $char_set, 'Data' => $subject, ], ], // If you aren't using a configuration set, comment or delete the // following line //'ConfigurationSetName' => $configuration_set, ]); $messageId = $result['MessageId']; echo("Email sent! Message ID: $messageId"."\n"); } catch (AwsException $e) { // output error message if fails echo $e->getMessage(); echo("The email was not sent. Error message: ".$e->getAwsErrorMessage()."\n"); echo "\n"; } } public function verifyEmailIdentity($email = "") { $result = $this->SES->verifyEmailIdentity([ 'EmailAddress' => $email, ]); //print_r($result); } public function sendCustomVerificationEmail($email,$template_name = 'myCustom') { $result = $this->SES->sendCustomVerificationEmail([ //'ConfigurationSetName' => '