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

add ability to unset mailprefix, as well as override prefix per Mailer instance #4228

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

takuy
Copy link
Contributor

@takuy takuy commented Mar 2, 2024

This will allow you to set $conf['mailprefix'] to !!not set!!, to avoid prepending a subject prefix entirely. This method of config is borrowed from other features where null/empty string is not the same as being not set (ie manager, remoteuser and some plugin configs).

This also also introduces a function to set an email/class instance-specific prefix - using the Mailer->setSubjectPrefix() function, overriding the site-wide mailprefix and/or the page title.

@splitbrain
Copy link
Collaborator

first question: why? what's the motivation here?

@takuy
Copy link
Contributor Author

takuy commented Mar 2, 2024

first question: why? what's the motivation here?

The mailprefix just isn't that useful for emails for me or my audience, so my main goal is just to turn it off, but also have flexibility in setting it per email if needed.

Since there's only 1 event for all of email, there's no appropriate place to do this as a plugin without copy and pasting the entire email class. This change doesn't break any existing behavior.

For context, using a combination of plugins and my own code, I built out a system in Dokuwiki that allows our users to template and stage email content, where they can then send it out to our mailing list platform. There's no real prefix that needs to be there, it's all used internally for a non-wiki audience.

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

Successfully merging this pull request may close these issues.

None yet

2 participants