What do you mean with sending a view by email?
Mail::send is not what ur looking for?
$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) { ... });
I got then
Swift_TransportException in StreamBuffer.php line 265: Connection could not be established with host mailtrap.io [Connection timed out #110]
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community