Hello,
Do you have complicated methods for doing that?
$view = View::make($viewname, $paramArray);
And then?
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('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) { ... });
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