'sdk.class.php')); App::import('Component','Email'); class EmailServiceComponent extends EmailComponent { function _aws_ses() { $ses = new AmazonSES(); $destination = array( 'ToAddresses' => explode(',', $this->to) ); $message = array( 'Subject' => array( 'Data' => $this->subject ), 'Body' => array() ); if($this->textMessage != NULL) { $message['Body']['Text'] = array( 'Data' => $this->textMessage ); } if($this->htmlMessage != NULL) { $message['Body']['Html'] = array( 'Data' => $this->htmlMessage ); } $response = $ses->send_email($this->from, $destination, $message); $ok = $response->isOK(); if(!$ok) { $this->log('Error sending email from AWS SES: '.$response->body->asXML(), 'debug'); } return $ok; } } // Then you need to replace every occurrence of EmailComponent with EmailServiceComponent, and set the delivery like this: // $this->EmailService->delivery = 'aws_ses';