lundi 27 mai 2019

Sending email passing name in laravel

I'm trying to send an email to a user by entering his name and I look for the user's email with this name, but it does not work, the success message appears but in my email I receive nothing. what am I doing wrong?

if(User::where('name', '=', $destinatario)->exists()){
        $exists = DB::table('users')
        ->select('email')
        ->where('name', $destinatario)
        ->get();
        Mail::to($exists)->send(new TestEmail($remetente, $nome, $assunto, $exists, $mensagem));
        return back()->with('sucess', 'Message sent!');
    }else{
        return back()->with('error', 'User does not exist!');
    }



from Newest questions tagged laravel-5 - Stack Overflow http://bit.ly/2YKERN0
via IFTTT

Aucun commentaire:

Enregistrer un commentaire