loic-sharma / Messages

A Laravel Bundle for the Swiftmailer library
GNU Lesser General Public License v3.0
39 stars 7 forks source link

Adding custom headers #25

Closed karlclement closed 11 years ago

karlclement commented 11 years ago

How do I add custom headers? I would like to send email with custom headers because Mandrill requires custom headers to add tracking to emails.

Thanks,

loic-sharma commented 11 years ago

You'll need to do it directly through Swiftmailer. You can get an instance of it by doing:

Messages::send(function($message)
{
   $swift = $message->swift();

  // ...
});

To learn how to add headers using the Swiftmailer, read this: http://swiftmailer.org/docs/headers.html#header-types