Emails from your own address
Emails WordPress sends come from an address you choose instead of wordpress@yourdomain.
Before you switch it on: Replace hello@example.com with an address on your own domain.
It arrives switched off, even when you install its whole pack with "Switch on after installing".
<?php
add_filter(
'wp_mail_from',
static function ( $email ) {
// Only replace the default wordpress@ address.
return str_starts_with( $email, 'wordpress@' ) ? 'hello@example.com' : $email;
}
);
Good to know
Use an address on your site’s domain, or emails may land in spam. An SMTP plugin or the SMTP snippet sets it as well.
In these packs
- Email: Emails from your name and address, sent through SMTP, and fewer notification emails.