Support the ongoing development of Laravel.io →
Views Blade Mail

Hello,

Do you have complicated methods for doing that?

$view = View::make($viewname, $paramArray);

And then?

Last updated 3 years ago.
0

What do you mean with sending a view by email?

Mail::send is not what ur looking for?

0
Solution
	$data = [
		'data' => 'passed',
		'to'   => [
			'the' => 'view',
		]
	];
	Mail::send('path.to.view', $data, function (\Illuminate\Mail\Message $message)
	{
		/* "Required" (It's self explaining ;)) */
		$message->to('customer@email.com', 'John Doe');
		
		/* Optional */
		$message->from('your@company.com', 'Company Inc.');
		$message->sender('your@company.com', 'Company Inc.');
		$message->cc('cc@email.com', 'CC Recipient');
		$message->bcc('bcc@email.com', 'BCC Recipient');
		$message->replyTo('noreply@company.com');
		$message->subject('Subject of your mail');
	});

If you want to queue an email, just use "::queue instead auf "::send":

Mail::queue('path.to.view', $data, function (\Illuminate\Mail\Message $message) { ... });
Last updated 9 years ago.
0

I got then

Swift_TransportException in StreamBuffer.php line 265: Connection could not be established with host mailtrap.io [Connection timed out #110]

0

Sign in to participate in this thread!

Eventy

Your banner here too?

mdahmen mdahmen Joined 1 Aug 2015

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.

© 2025 Laravel.io - All rights reserved.