PHP code example of prasanth-gandiva / yii2-yashop-ses

1. Go to this page and download the library: Download prasanth-gandiva/yii2-yashop-ses 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/ */

    

prasanth-gandiva / yii2-yashop-ses example snippets


'components' => [
    ...
    'mail' => [
        'class' => 'yashop\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();

$file = "www.example.com/file/demo.csv";
Yii::$app->mail->compose('contact/html', ['contactForm' => $form])
    ->setFrom('[email protected]')
    ->setTo($form->email)
    ->setSubject($form->subject)
    ->attach($file)
    ->send();

php composer.phar