I saw lot of thread is there to explain send email with template using sendgrid. But I have email template in third party sendgrid server not in my project folder. Only template ID is with me. I am using this package and my email send function is like that as explain in the readme.
\Mail::send('view', $data, function (Message $message) {
$message
->to('foo@example.com', 'foo_name')
->from('bar@example.com', 'bar_name')
->embedData([
'category' => 'user_group1',
'unique_args' => [
'user_id' => 123
]
], 'sendgrid/x-smtpapi');
});
when I pass a view in my views folder variable 'view' it works well. But my question is how to pass template ID in the sendgrid and use that template from my code ? Please help.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire