Open jaketoolson opened 9 years ago
A nice suggestion :) 10x will try to implement at some point. The sad part is that from a quick poking around Swiftmailer I couldn't find a way to make this a "per message" assignment, it should probably have to be set directly to the transport...
@ivank -- I came to the same conclusion. I was hoping to just add a method to message but it would almost require a custom extension of Swift_Message or a trait. The only other thought I had was listening to the swift events and doing it this way.
Swift employs special "X-Swift-...." headers to pass custom message data around internally.
We might be able to use some mechanism like this.
E.g.
// By doing this directly
$message->getHeaders()->addTextHeader('X-Swift-Postmark-Track', true);
// Or maybe by adding a static method to do that for us
Swift_PostmarkTransport::setTrack($message);
PostmarkApp's API has additional methods "Tag" and "TrackOpens" http://developer.postmarkapp.com/developer-api-email.html#send-email
It would be nice to add these optional methods.