ivan1911 / yii2-mailgun-mailer
Mailgun Mailer for Yii 2 framework.
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 22
Type:yii2-extension
Requires
- mailgun/mailgun-php: 1.7.1
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2024-04-13 15:17:26 UTC
README
Mailgun mailer for Yii 2 framework.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist ivan1911/yii2-mailgun-mailer "*"
or add
"ivan1911/yii2-mailgun-mailer": "*"
to the require section of your composer.json
file.
Usage
Once the extension is installed, simply use it in your code by :
<?php Yii::$app->mailer->compose('<view_name>', <option>) ->setFrom("<from email>") ->setTo("<to email>") ->setSubject("<subject>") ->addTags(['<tag1>', '<tag2>']) ->addCampaignId('<compaignId>') //->setHtmlBody("<b> Hello User </b>") //->setTextBody("Hello User") ->send(); ?>```