lol. Just a guess, maybe you should try avoid using the word message
in your template.
http://laravel.com/api/source-class-Illuminate.Mail.Mailer.html#109
ahmednawazbutt liked this reply
Actually I tried that and it still didn't work. I found that the error was that the textarea was returning something weird and not a string. That's my guess tho lol I still haven't found out
Would you mind explaining what you have tried? If I remember correctly, $message
in email template is used by the instance itself and it is useful for attaching attachment in the template.
http://laravel.com/api/source-class-Illuminate.Mail.Mailer.html#109
By looking at part of your error message, it looks like you were trying to echo out an object which is Illuminate\Mail\Message
as string which it will certainly throw out an error when you do so.
Or maybe there is actually more than one error ?
Reference: http://laravel.com/docs/mail#basic-usage
awsp said:
Would you mind explaining what you have tried? If I remember correctly,
$message
in email template is used by the instance itself and it is useful for attaching attachment in the template.http://laravel.com/api/source-class-Illuminate.Mail.Mailer.html#109
By looking at part of your error message, it looks like you were trying to echo out an object which is
Illuminate\Mail\Message
as string which it will certainly throw out an error when you do so.Or maybe there is actually more than one error ?
Reference: http://laravel.com/docs/mail#basic-usage
Thanks pal, you just helped me. I was using message keyword as well
$data = array(
'message' => $askerMessage
);
and in blade template : {{ $message }}
I changed it to messages and it worked. Cheers
$data = array(
'messages' => $askerMessage
);
and in blade template : {{ $messages }}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community