Skip to content

Early-bird lifetime licence: $199 once, for the first 200 buyers only. See the offer

Emails from your site name

Emails WordPress sends come from your site’s name instead of “WordPress”.

  • Type PHP
  • Runs Everywhere (runs as WordPress loads)
  • Category Email
  • Tested with WordPress 7.1
PHP
<?php

add_filter(
	'wp_mail_from_name',
	static function ( $name ) {
		// Only replace the default; plugins that set a name keep theirs.
		return 'WordPress' === $name ? wp_specialchars_decode( get_bloginfo( 'name' ), ENT_QUOTES ) : $name;
	}
);

In these packs

  • Email: Emails from your name and address, sent through SMTP, and fewer notification emails.

Move your snippets over this afternoon.

Importing changes nothing until you switch over, and your old shortcodes keep working.