Changing From email Id of email alert

How can change the from email id for all email alert. Currently it take default pressbooks and it goes to spam folder, we want to change it to an validated email

This is where the email is set:

So, you can use your own custom address by adding this to your wp-config.php:

define( 'WP_MAIL_FROM', '' );

Thank you @ned…very much appreciated…

The Sender name in the emails goes from here

function mail_from_name( $name ) {
if ( defined( ‘WP_MAIL_FROM_NAME’ ) ) {
} else {
$name = ‘Pressbooks’;
return $name;

Is n’t the Sender name should be of the default “Sitename”…Currently the sender name goes as “Pressbooks”

The default from name in WordPress is WordPress, so we followed the same pattern (see line 258 here). You can change it by doing exactly the same thing I showed you how to do in my previous post, defining WP_MAIL_FROM_NAME to whatever you’d like in wp-config.php.

define( ‘WP_MAIL_FROM’, ‘’ ); —This works perfectly fine
define( ‘WP_MAIL_FROM_NAME’, ‘yourdomainname’ ); —This did not work, still pressbook names comes in the name…DId I make any mistake ?

1 Like

Your email screenshots are error logs. We hardcode “Pressbooks” there because these are system logs. We do this because we want to know these come from Pressbooks the system, and not marketing or support. The code is here: