Fix Email Sender Address
Configure WordPress email sender settings with admin dashboard controls
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/chrisjrocen/fix-email-sender/archive/refs/heads/main.zipDescription
This plugin allows you to configure your site's email sender information through the WordPress admin dashboard interface. Prevents emails from being sent from generic server addresses like wordpress@yourhostname.com
This plugin provides a user-friendly admin interface located under Tools → Email Settings where you can dynamically configure:
- From Email Address - The email that appears as the sender
- From Name - The name that appears as the sender
- Reply-To Email Address - Where replies are directed
All settings are applied dynamically across all WordPress emails, including:
- User registration emails
- Password reset emails
- Comment notifications
- Contact form submissions
- WooCommerce order notifications
- Any other emails sent via
wp_mail()
Features
Core Features
- Easy Configuration Interface - Simple admin panel under Tools menu
- Dynamic Email Settings - Change sender info without editing code
- Built-in Test Email - Verify your settings work correctly
- Maximum Compatibility - Multiple filter hooks ensure settings override other plugins
- PHPMailer Integration - Direct PHPMailer manipulation for stubborn hosts
- Visual Settings Display - See your current configuration at a glance
- Security First - Email validation, nonce verification, and capability checks
Technical Features
- High-priority filters (999999) to override other plugins
- Multiple email filter hooks for comprehensive coverage:
wp_mail_fromwp_mail_from_namewp_mail(for headers)phpmailer_init(direct PHPMailer control)
- Proper Reply-To header implementation
- Return-Path header support
- Email validation and sanitization
- Error logging (when WP_DEBUG is enabled)
- Clean, well-documented code following WordPress coding standards
Installation
Method 1: Manual Installation
- Download the plugin files
- Upload the
fix-email-senderfolder to/wp-content/plugins/ - Activate the plugin through the 'Plugins' menu in WordPress
- Go to Tools → Email Settings to configure
Method 2: Direct Upload
- Go to Plugins → Add New in your WordPress admin
- Click Upload Plugin
- Choose the plugin ZIP file
- Click Install Now
- Activate the plugin
- Go to Tools → Email Settings to configure
First-Time Setup
Upon activation, the plugin automatically sets default values based on your WordPress configuration:
- From Email defaults to your site's admin email
- From Name defaults to your site's name
- Reply-To defaults to your site's admin email
You can customize these immediately after activation.
Usage
Configuring Email Settings
-
Navigate to Tools → Email Settings in your WordPress admin dashboard
-
You'll see three configuration fields:
From Email Address
- Enter the email address you want to appear as the sender
- Must be a valid email address
- Example:
office@yourdomain.com
From Name
- Enter the name you want to appear as the sender
- This is what recipients see before the email address
- Example:
Your Company Name
Reply-To Email Address
- Enter the email where you want replies to be sent
- Can be the same as or different from the From Email
- Example:
support@yourdomain.com
-
Click Save Email Settings
-
You'll see a success message confirming your settings were saved
Testing Your Configuration
The plugin includes a built-in test email feature:
- After saving your settings, scroll to the Test Email Configuration section
- Enter a recipient email address (defaults to your user email)
- Click Send Test Email
- Check your inbox (and spam folder) for the test email
- Verify the sender information is correct
The test email includes:
- Your site name
- Timestamp
- All current email settings
- Confirmation message
Viewing Current Settings
The Current Settings table at the bottom of the settings page displays:
- Your active From Email
- Your active From Name
- Your active Reply-To address
This allows you to quickly verify your configuration without editing.
Frequently Asked Questions
Why do I need this plugin?
By default, WordPress sends emails from generic server addresses (like wordpress@yourhostname.com), which:
- Look unprofessional
- May be marked as spam
- Don't match your brand
- Can't receive replies
This plugin fixes all of these issues with an easy-to-use interface.
Will this work with my email plugin?
Yes! This plugin uses high-priority filters (999999) to ensure your settings override other plugins. It works alongside:
- Contact Form 7
- WPForms
- Gravity Forms
- WooCommerce
- Easy Digital Downloads
- Any plugin using
wp_mail()
What if emails still show the wrong sender?
If emails still show incorrect sender information:
- Check your settings - Make sure you saved them correctly
- Send a test email - Use the built-in test feature
- Check spam filters - Some email providers override sender info
- Enable debugging - Set
WP_DEBUGtotruein wp-config.php - Check your host - Some hosts restrict sender addresses
- SPF/DKIM Records - Ensure your domain's DNS is configured correctly
Does this plugin send emails?
No, this plugin only controls WHO the email appears to be from. It doesn't:
- Send emails itself
- Replace your SMTP configuration
- Handle email delivery
For email delivery issues, consider an SMTP plugin like WP Mail SMTP or Post SMTP.
Can I use different sender addresses for different email types?
Not directly. This plugin sets a global sender for all WordPress emails. If you need different senders for different email types, you'd need custom code to hook into specific email functions.
Is this plugin compatible with SMTP plugins?
Yes! This plugin works great with SMTP plugins. Use an SMTP plugin for reliable email delivery, and this plugin for sender identity control.
Will this work on shared hosting?
Yes, it's designed to work on any hosting environment. The plugin uses multiple methods to ensure compatibility even on restrictive hosts.
Support & Compatibility
WordPress Compatibility
- Requires WordPress 5.0 or higher
- Tested up to WordPress 6.7
- Works with Classic Editor and Block Editor
PHP Compatibility
- Requires PHP 7.4 or higher
- Tested with PHP 8.0, 8.1, 8.2, and 8.3
Plugin Compatibility
Works with popular plugins including:
- WooCommerce
- Contact Form 7
- WPForms
- Gravity Forms
- Easy Digital Downloads
- BuddyPress
- bbPress
- And many more!
Troubleshooting
Emails Not Sending
This plugin controls sender identity, not email delivery. If emails aren't sending at all:
- Check your server's email configuration
- Consider using an SMTP plugin
- Enable WP_DEBUG to see error messages
Sender Still Shows Wrong Address
- Clear any caching plugins
- Deactivate other email-related plugins temporarily
- Check if your host enforces specific sender addresses
- Verify your domain's DNS/SPF records
Test Email Not Received
- Check your spam/junk folder
- Verify the recipient email is correct
- Check server error logs
- Contact your hosting provider about email restrictions
Changelog
Version 1.0 (2025-11-11)
Initial Release
Features:
- Admin settings page under Tools menu
- Three configurable fields (From Email, From Name, Reply-To)
- Built-in test email functionality
- Current settings display table
- High-priority email filters for maximum compatibility
- Direct PHPMailer integration
- Settings link on plugins page
- Automatic default values on activation
- Email validation and sanitization
- Security hardening (nonces, capability checks)
- Error logging for debugging
- WordPress coding standards compliant
Development
Hooks & Filters
The plugin implements these WordPress hooks:
Actions:
admin_menu- Adds settings pageadmin_init- Registers settings and handles test emailsphpmailer_init- Configures PHPMailer directlywp_mail_failed- Logs email failuresplugin_action_links_{basename}- Adds settings link
Filters:
wp_mail_from(priority 999999) - Sets from emailwp_mail_from_name(priority 999999) - Sets from namewp_mail(priority 999999) - Adds headers including Reply-To
Settings Storage
Settings are stored in WordPress options table:
fes_email_from_email- From email addressfes_email_from_name- From namefes_email_reply_to- Reply-to email address
Function Prefix
All functions are prefixed with fes_ to avoid conflicts:
fes_add_email_settings_page()fes_register_email_settings()fes_wp_mail_from()- etc.
Privacy & Data
This plugin:
- Does NOT collect any user data
- Does NOT send data to external services
- Does NOT track users
- Only stores the three email configuration settings in your WordPress database
- Does NOT modify email content
Security
Security features:
- Email validation using WordPress
sanitize_email()andis_email() - Nonce verification for all form submissions
- Capability checks (
manage_optionsrequired) - Input sanitization for all fields
- SQL injection prevention via WordPress APIs
- XSS prevention via proper escaping
Credits
Developed by: Chris Ocen
Built with care for the WordPress community.
License
This plugin is licensed under the GPL v2 or later.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Support
For bug reports, feature requests, or general support:
- Check the FAQ section above
- Review the Troubleshooting section
- Contact: https://ocenchris.com
Contributing
We welcome contributions! If you'd like to contribute:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
Please follow WordPress coding standards and include clear commit messages.
Thank you for using Fix Email Sender Address!
If this plugin helps your WordPress site, please consider leaving a review.