Introduction
BuddyBoss does not provide a built-in option to change the sender email address used in WordPress emails. By default, emails are sent from a generic WordPress address. However, you can customize this behavior by adding a small function to your active theme, allowing emails to appear as if they are sent from your business email address instead.
Custom Workaround
Before proceeding, make sure you have a complete site backup.
- Go to Appearance > Theme Editor in your WordPress admin dashboard.
- Under Select theme to edit, choose your active theme (preferably BuddyBoss Child Theme), then click Select.
- From the Theme Files list, open Theme Functions (functions.php).
- Add the following code just before the closing PHP tag (?>):
function wpb_sender_email( $original_email_address ) {
return '[email protected]';
}
add_filter( 'wp_mail_from', 'wpb_sender_email' );- Click Update File to save the changes.
Once applied, all outgoing WordPress emails will use the specified email address as the sender.
Troubleshooting and FAQs
Q: The sender email didn’t change. Why?
A: Ensure the code is added to the active theme’s functions.php file and clear any site or email caching.
Q: Will this affect all outgoing emails?
A: Yes. This change applies to all WordPress-generated emails.
Q: How can I revert this change?
A: Simply remove the code from functions.php and save the file.