$email = \Yii::$app->mailer->compose( | $email = \Yii::$app->mailer->compose( | ||||
[ | [ | ||||
'html' => 'sendDocument-html', | |||||
'text' => 'sendDocument-text' | |||||
'html' => '@common/mail/sendDocument-html', | |||||
'text' => '@common/mail/sendDocument-text' | |||||
], [ | ], [ | ||||
'document' => $document | 'document' => $document | ||||
]) | ]) |
if($user && $user->email && strlen($user->email) > 0) { | if($user && $user->email && strlen($user->email) > 0) { | ||||
\Yii::$app->mailer->compose( | \Yii::$app->mailer->compose( | ||||
[ | [ | ||||
'html' => 'creditLimitReminder-html', | |||||
'text' => 'creditLimitReminder-text' | |||||
'html' => '@common/mail/creditLimitReminder-html', | |||||
'text' => '@common/mail/creditLimitReminder-text' | |||||
], | ], | ||||
[ | [ | ||||
'user' => $user, | 'user' => $user, |