-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow explicit ordering of message headers #121
Comments
Is this feature still desirable? |
Yes, but be aware it's very difficult to do because of the inconsistent way that headers are handled in PHPMailer. If it was as simple as adding append/prepend methods I've have done it... |
This may need some refactoring on all occurancies of $mailHeader and $MIMEheader first, does it? Like, adding setters and getters to a private assoc array that can be imploded later. Just a guess ... |
It needs to be more involved than a simple assoc array because you can have multiple headers with the same label. My initial thought is to create header and headerCollection classes, and these would be used within the message as a whole (possibly non-MIME), and also within (possibly nested) MIME parts. This would line up with a notional set of MIME leaf and multipart container classes. Being able to support SMTPUTF8 means that all encoding features need to be fairly dynamic. All in all, a big can of worms... |
This bug is quite reasonable. We should be able to add headers in specific order, perhaps with prepend/append rather than just add.
The text was updated successfully, but these errors were encountered: