2017 © Pedro Peláez
 

yii2-extension yii2-sendgrid

Sendgrid Mailer for Yii2

image

thiagotalma/yii2-sendgrid

Sendgrid Mailer for Yii2

  • Wednesday, October 11, 2017
  • by thiagotalma
  • Repository
  • 2 Watchers
  • 0 Stars
  • 2,361 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 1 % Grown

The README.md

yii2-sendgrid

Sendgrid Mailer for Yii2, (*1)

based on shershennm/yii2-sendgrid, (*2)

Latest Stable Version Total Downloads, (*3)

Installation

The preferred way to install this extension is through composer., (*4)

Either run, (*5)

php composer.phar require --prefer-dist thiagotalma/yii2-sendgrid "*"

or add, (*6)

"thiagotalma/yii2-sendgrid": "*"

to the require section of your composer.json file., (*7)

Usage

To use Mailer, you should configure it in the application configuration like the following:, (*8)

Usign API Key:, (*9)

'components' => [
    ...
    'mailer' => [
        'class' => 'thiagotalma\sendgrid\Mailer',
        'key' => 'your api key',
        //'viewPath' => '@app/views/mail', // your view path here
    ],
    ...
],

Usign username and password:, (*10)

'components' => [
    ...
    'mailer' => [
        'class' => 'thiagotalma\sendgrid\Mailer',
        'username' => 'your username',
        'password' => 'your password here',
        //'viewPath' => '@app/views/mail', // your view path here
    ],
    ...
],

To send an email, you may use the following code:, (*11)

$sendGrid = Yii::$app->mailer;
$message = $sendGrid->compose('contact/html', ['contactForm' => $form])
$message->setFrom('from@domain.com')
    ->setTo($form->email)
    ->setSubject($form->subject)
    ->send();
    //also you can use sendgrid substitutions
    ->setSendGridSubstitution('template id', [
        ':var1' => 'var1value',
        ':var2' => 'var2value',
    ]);

The Versions

11/10 2017

dev-api_v3

dev-api_v3

Sendgrid Mailer for Yii2

  Sources   Download

MIT

The Requires

 

extension yii2 email sendgrid api smtp

10/04 2017

dev-tiagovb-patch-2

dev-tiagovb-patch-2

Sendgrid Mailer for Yii2

  Sources   Download

MIT

The Requires

 

extension yii2 email sendgrid api smtp

10/04 2017

dev-tiagovb-patch-1

dev-tiagovb-patch-1

Sendgrid Mailer for Yii2

  Sources   Download

MIT

The Requires

 

extension yii2 email sendgrid api smtp

30/08 2016

dev-master

9999999-dev

Sendgrid Mailer for Yii2

  Sources   Download

MIT

The Requires

 

extension yii2 email sendgrid api smtp

29/08 2016

v0.1

0.1.0.0

Sendgrid Mailer for Yii2

  Sources   Download

MIT

The Requires

 

extension yii2 email sendgrid api smtp