Answer the question
In order to leave comments, you need to log in
Error sending E-Mail in Laravel, what should I do?
There is a model that sends an E-Mail message.
class MailSend extends Eloquent{
/**
* Отправка сообщения на E-Mail об
* успешной регистрации
* @param [array] $data [Данные]
* @param [string] $key [Ключ активации]
* @return [type] [description]
*/
public static function sendActivationsUsers($data, $key){
$login = $data['login_users'];
$mail = $data['mail_users'];
Mail::send('emails.auth.register', ['login' => $login, 'mail' => $mail, 'key' => $key], function($msg){
$msg->to($mail)->subject("С успешной регистрацией!"); // Кому
});
}
}
Answer the question
In order to leave comments, you need to log in
Because it needs to be like this:
Mail::send('emails.auth.register', ['login' => $login, 'mail' => $mail, 'key' => $key], function($msg) use ($mail) {
$msg->to($mail)->subject("С успешной регистрацией!"); // Кому
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question