Yii Framework Forum: integrate mandrill in yii2 - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

integrate mandrill in yii2 Rate Topic: ***** 1 Votes

#1 User is offline   ajith 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 23
  • Joined: 20-March 15
  • Location:Kerala,India

Posted 23 March 2015 - 05:43 AM

run in terminal following code

php composer.phar require --prefer-dist nickcv/yii2-mandrill "*"

code to be inserted in web .php

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

code to be inserted inparams.php

return [
'adminEmail' => 'admin@example.com',
];

code to be inserted in controller

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

hope it works.have a nice day :)

regards
ajith
1

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users