PHP code example of simialbi / yii2-mandrill

1. Go to this page and download the library: Download simialbi/yii2-mandrill 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/ */

    

simialbi / yii2-mandrill example snippets


[
	'id' => 'basic',
	'name' => 'Application Name',
]

return [
    'adminEmail' => '[email protected]',
];

    'mailer' => [
        'class' => 'nickcv\mandrill\Mailer',
        'apikey' => 'YourApiKey',
    ],

\Yii::$app->mailer
    ->compose('mailViewName', ['model' => $model])
    ->setTo('[email protected]')
    ->send();

    'mailer' => [
        'class' => 'nickcv\mandrill\Mailer',
        'apikey' => 'YourApiKey',
        'useMandrillTemplates' => true,
        'useTemplateDefaults' => false,
    ],

    'mailer' => [
        'class' => 'nickcv\mandrill\Mailer',
        'apikey' => 'YourApiKey',
        'useMandrillTemplates' => true,
        'templateLanguage' => nickcv\mandrill\Mailer::LANGUAGE_HANDLEBARS,
    ],

\Yii::$app->mailer
    ->compose('mailViewName', ['model' => $model])
    ->setTags(['registration']);

\Yii::$app->mailer
    ->compose('mailViewName', ['model' => $model])
    ->enableAsync();

\Yii::$app->mailer
    ->compose($stringTemplate)
    ->setTo($arrayTo)
    ->setGlobalMergeVars($arrayGolbalMergeVars)
    ->setMergeVars($arrayMergeVars)
    ->send();

php composer.phar