jeudi 22 octobre 2015

Set SendGrid category in Laravel's mail library

I'm sending an email in Laravel via SendGrid using the configuration suggested in SendGrid's docs (http://ift.tt/1M8zFEq).

Just to provide an example of how it looks now:

Mail::send('emails.demo', $data, function($message)
{
    $message->to('jane@example.com', 'Jane Doe')->subject('This is a demo!');
});

The email itself works fine, but I'd like to add a SendGrid category. I've accomplished this in past non-Laravel projects using the addCategory() method in http://ift.tt/1kwicQk.

My question: Is there an easy way to add a SendGrid category just using the Laravel mail library, or does it make more sense to just use the SendGrid PHP library?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire