PHP code example of waytonoway / mailer-ses-v4

1. Go to this page and download the library: Download waytonoway/mailer-ses-v4 library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

waytonoway / mailer-ses-v4 example snippets


'components' => [
    ...
    'mail' => [
        'class' => 'waytonoway\ses\Mailer',
        'access_key' => 'Your access key',
        'secret_key' => 'Your secret key',
        'host' => 'email.us-east-1.amazonaws.com' // not 

Yii::$app->mail->compose('contact/html', ['contactForm' => $form])
    ->setFrom('[email protected]')
    ->setTo($form->email)
    ->setSubject($form->subject)
    ->send();

Yii::$app->mail->compose('contact/html', ['contactForm' => $form])
    ->setFrom('[email protected]')
    ->setTo($form->email)
    ->setSubject($form->subject)
    ->setHeader('Precedence', 'bulk')
    ->setHeader('List-id', '<1>')
    ->setHeader('List-Unsubscribe', Url::to(['user/unsubscribe'], true))
    ->send();