Support the ongoing development of Laravel.io →
Views Blade Mail
Last updated 1 year 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('[email protected]', 'John Doe');
		
		/* Optional */
		$message->from('[email protected]', 'Company Inc.');
		$message->sender('[email protected]', 'Company Inc.');
		$message->cc('[email protected]', 'CC Recipient');
		$message->bcc('[email protected]', 'BCC Recipient');
		$message->replyTo('[email protected]');
		$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 8 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.

© 2024 Laravel.io - All rights reserved.