Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 29929

htmlspecialchars() expects parameter 1 to be string, object given - Laravel Error Mailer

$
0
0

I am using laravel mailer for sending mail. but it gives me this error.Please can you get me out of this? Thanks in Advance.

This is the controller part.

DB::table('email')->insert([            ['subject' => $subject, 'message' => $messages, 'sent_to' => $to_email, 'patient' => $patient_id, 'file' => $target_file]        ]);Mail::send('emails.mail', ['message' => $messages], function($message) use ($to_email) {            $message->to($to_email)            ->subject($subject);            $message->from('physical.org','TestMail');        });

Now, this is mail.blade.php

{{ $message }}

Viewing all articles
Browse latest Browse all 29929

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>