Skip to content
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

Open
Synchro opened this issue Oct 14, 2013 · 4 comments
Open

Allow explicit ordering of message headers #121

Synchro opened this issue Oct 14, 2013 · 4 comments

Comments

@Synchro
Copy link
Member

Synchro commented Oct 14, 2013

This bug is quite reasonable. We should be able to add headers in specific order, perhaps with prepend/append rather than just add.

@goizueta
Copy link

Is this feature still desirable?

@Synchro
Copy link
Member Author

Synchro commented Jul 21, 2016

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...

@chornde
Copy link

chornde commented May 11, 2018

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 ...

@Synchro
Copy link
Member Author

Synchro commented May 13, 2018

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants