Support the ongoing development of Laravel.io →
Views Blade Mail
Last updated 2 years ago.
0

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

Last updated 2 years ago.

ahmednawazbutt liked this reply

1

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

Last updated 2 years ago.
0

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

Last updated 2 years ago.
0

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 }}

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

amilajack amilajack Joined 19 Jul 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.