yashop-ses Amazon SES for Yii2

Amazon ses extension for Yii2

  1. Installation
  2. Usage

Extension for sending emails via amazon ses. Part of YaShop.

Sources on github - https://github.com/ofat/yashop-ses

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist ofat/yii2-yashop-ses "*"

or add

"ofat/yii2-yashop-ses": "*"

to the require section of your composer.json file.

Usage

To use this extension, you should configure it in the application configuration like the following:

'components' => [
    ...
    'mail' => [
        'class' => 'yashop\ses\Mailer',
        'access_key' => 'Your access key',
        'secret_key' => 'Your secret key'
    ],
    ...
],

To send an email, you may use the following code:

Yii::$app->mail->compose('contact/html', ['contactForm' => $form])
    ->setFrom('from@domain.com')
    ->setTo($form->email)
    ->setSubject($form->subject)
    ->send();
1 0
1 follower
217 downloads
Yii Version: 2.0
License: MIT
Category: Mail
Developed by: ofatv
Created on: May 2, 2014
Last updated: 10 years ago

Downloads

show all

Related Extensions