Add custom header -- possible?

Swift Mailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.

Moderators: Chris Corbyn, General Moderators

Post Reply
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Add custom header -- possible?

Post by alex.barylski »

Is it possible to add a custom header to each email?

Something like:

Code: Select all

X-Custom: K6354
How would I go abouts adding this field -- or do I need to get into the guts of Swift to do this?
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: Add custom header -- possible?

Post by Chris Corbyn »

Code: Select all

$message->headers->set('X-Custom', 'K6354');
http://www.swiftmailer.org/wikidocs/v3/ ... on/headers
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Add custom header -- possible?

Post by alex.barylski »

Groovy :)
Post Reply