Message Headers
Sometimes you'll want to add your own headers to a message or modify/remove headers that are already present. You work with the message's HeaderSet to do this.
-
Header Basics
All MIME entities in Swift Mailer – including the message itself – store their headers in a single object called a HeaderSet. This HeaderSet is retrieved with the getHeaders() method. -
Header Types
Because all headers are modeled on different data (dates, addresses, text…) there are different types of Header in Swift Mailer. Swift Mailer attempts to categorize all possible MIME headers into more general groups, defined by a small number of classes. -
Header Operations
Working with the headers in a message involves knowing how to use the methods on the HeaderSet and on the individual Headers within the HeaderSet.
Previous topic: Creating Messages
Next topic: Sending Messages