Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/email/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
用laravel发送电子邮件_Laravel_Email_Events_Listener - Fatal编程技术网

用laravel发送电子邮件

用laravel发送电子邮件,laravel,email,events,listener,Laravel,Email,Events,Listener,我想通过电子邮件为注册用户发送激活链接。我使用事件和侦听器。我一步一步地测试代码,没有任何错误,$code是存在的。但在mailtrap中没有发送电子邮件 在mail/ActivationUser中,我有以下代码: public function build() { return $this->subject('لینک فعالسازی') ->markdown('emails.active_user'); } $code已发送到邮件文件中的结构函数 在list

我想通过电子邮件为注册用户发送激活链接。我使用事件和侦听器。我一步一步地测试代码,没有任何错误,$code是存在的。但在mailtrap中没有发送电子邮件

在mail/ActivationUser中,我有以下代码:

public function build()
{

    return $this->subject('لینک فعالسازی')
    ->markdown('emails.active_user');
}
$code已发送到邮件文件中的结构函数

在listener/SendMail中:

 * @param  UserActivation  $event
 * @return void
 */
public function handle(UserActivation $event)
{
    //send $user & $code to mail/ActivationUseAccount

   Mail::to($event->user)->send(new ActivationUserAccount($event->user,$event->activationCode));
}
问题出在哪里