Open coreymckrill opened 4 years ago
I like the idea 👍
always want the sender name to be the name of the WordCamp
I think so, except for edge cases like Central, Plan, etc. get_wordcamp_name()
might already gracefully handle those, but get_bloginfo( 'name' )
might be a bit safer 🤷♂️
change the default sender email address to city@wordcamp.org
That'd be good, but we'd have to be careful to not trigger anti-spam filters. It might be safer to leave From
in tact, and set Reply-To
to the city@
instead (via phpmailer_init
&& addCustomHeader()
maybe).
Related:
Maybe this would fallback to get_option( 'admin_email' )
on non-event sites like Central?
Based on this conversation.
There are a lot of different places in the WordCamp codebase where we send email to someone using
wp_mail
. These emails are often notifications or reminders. The default sender is usuallyWordPress <wordpress@year.city.wordcamp.org>
, though in some of these places, we are already manually setting the sender to something else, generally the WordCamp name. However, each place we do this, it's implemented slightly differently.wp_mail
has two filters related to the sender:wp_mail_from_name
filters the name, andwp_mail_from
filters the email address. (Reply-To
doesn't have a filter, and must be set as a header during thewp_mail
call.)It seems like we would always want the sender name to be the name of the WordCamp, rather than
WordPress
. We could accomplish this by hooking to thewp_mail_from_name
in an mu-plugin, and then removing the other custom implementations elsewhere in our codebase. Of course, we'd want to use a conditional so that if there was an exception, our filter wouldn't override it.It might also make sense to change the default sender email address to
city@wordcamp.org
, though I'm less certain about this.