email not going

Published 3 months ago by Webiondev123

 $email=User::find($id);
       Mail::send(['text'=>'mail'], $request->message, function($message) {
                 $message->to($email->email, name')->subject
                    ('New Message!');
                 $message->from('[email protected]','mydomain');
      });

                

What am I doing wrong?

Best Answer (As Selected By Webiondev123)
Webiondev123

@Sergiu17 thanks I used notification to solve this

Sergiu17

What's the error? take a look here storage/logs/laravel.log

Webiondev123

@Sergiu17 Type error: Argument 2 passed to Illuminate\Mail\Mailer::send() must be of the type array, object given, called in

Webiondev123

@Sergiu17 thanks I used notification to solve this

Please sign in or create an account to participate in this conversation.