Reputation: 1121
I think I'm doing something worng.
I'm trying to pass a variable into an Email View. This varaibvle is read from the database and is configurable via administration page. For some reason, I'm getting the emails without the HTML paser (I see tags like in them) I wanted them to be parsed, so my client can manually change them everytime he wants.
How is that achievable?
My code is:
Mail::send('emails.contact', array(
'name' => $request->get('name'),
'email' => $request->get('email'),
'user_message' => $request->get('message'),
'email_content' => html_entity_decode($emailContent->Description)
), function($message) use ($result)
{
$message->from(env('MAIL_USERNAME'));
$message->to($result['From'], $result['Name']);
$message->subject('[Casa Bordeira] We received your message');
});
An in the view:
<div class="contentEditableContainer contentTextEditable">
<div class="contentEditable" align='left' >
<p>
Hello <strong>{{$name}}</strong>.
<br/>
{{$email_content}}
<br/>
<br/>
<br/>
Here's a copy of your message:
<br/>
<br/>
{{$user_message}}
</p>
</div>
</div>
Upvotes: 2
Views: 3460