PHP code example of itbeauftragter / yii2-nsl-mailgun
1. Go to this page and download the library: Download itbeauftragter/yii2-nsl-mailgun 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/ */
itbeauftragter / yii2-nsl-mailgun example snippets
'components' => [
...
'mailer' => [
'class' => 'itbeauftragter\mailgun\Mailer',
'key' => 'key-example',
'domain' => 'mg.example.com',
'endpoint' => 'api.eu.mailgun.net'
],
...
],
Yii::$app->mailer->compose('contact/html', ['contactForm' => $form])
->setFrom('[email protected]')
->setTo($form->email)
->addTags(['Tag1', 'Tag2'])
->setSubject($form->subject)
->send();
php composer.phar