Problem/Motivation
In #3511206: Document how to add a custom header, for example MessageStream: broadcast for Postmark it was documented how to add a custom header, such as changing a custom "Broadcast" field from "Transactional" to "Broadcast"
However it would be awesome, also for less technically savvy users, if this could be set via the GUI.
Steps to reproduce
Want to add a custom header, but not sure how ...
Proposed resolution
Add support for custom headers under /admin/config/system/mailer/policy/, since other email services could make use of this feature as well.
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork symfony_mailer-3527900
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
adamps commentedA complication is that there are various different types of header with different data/parameters. See Symfony\Component\Mime\Header\Headers.
Comment #5
opiBackported MR from https://www.drupal.org/project/symfony_mailer/issues/3511206#comment-161...
Note that only text headers are supported. Maybe this Email Adjuster may be renamed "text header" instead of "custom header".
Comment #7
ressaThanks @opi, should status here be "Needs review" as well?
Comment #8
opiindeed
Comment #9
adamps commentedMy concern is that these less technically savvy users don't necessarily know how to set headers correctly. A header is a part of the email that often isn't seen directly at UI level, but rather interpreted programmatically then displayed in a human-friendly format. It seems like a coding level concept rather than a UI one.
The feature could be used (accidentally or deliberately) to overwrite any of the standard headers, perhaps even in a way that has security implications. True, anyone with access to this UI page is already a trusted admin, but it doesn't mean they can't make a mistake, especially as they aren't technically savvy.
I feel this isn't something that belongs in the core module. Do you agree, do you see my point??
Comment #10
ressaThanks for your thoughtful answer, I really appreciate it. And I understand your concerns. But the way I see it, users can make mistakes or select wrong configuration all over the place. Users need to concentrate when they configure :)
I am myself less technically savvy coding-wise, who occasionally need to do something complex, like adding custom headers. But I have by now totally forgotten how the solution I documented works. I dread that something may change in a future version, and I got to deal with it then ...
And isn't it a good argument for custom headers, that the (I believe) fairly popular mail provider Postmark needs custom headers, so we should consider supporting it via the GUI?
Comment #11
opiEven if I'm a developper (comfy with editing config files, etc) I would appreciate to edit configuration through the UI. Adding a simple header to fit Postmark needs is a very good example.