FROM Address Blocked: Allow Simple Override with Reply-To Setting
-
Description
When the
FROM
address uses the admin email, it can lead to email delivery issues, particularly if the admin email’s domain does not match the website’s domain. This often causes emails to be flagged as spam or outright blocked by some mail servers.Currently, the plugin defaults the
FROM
address to the admin email. However, many hosting environments expect emails to originate from the website’s domain for security reasons.Steps to Reproduce
Outline how the problem can be encountered:
- Set the admin email to one not matching the website domain (e.g.,
[email protected]
). - Send a test booking confirmation email.
- Observe that the email is flagged as spam or blocked.
Expected Behavior
The email should send without being flagged as spam or blocked.
Current Behavior
Emails are frequently blocked or flagged because the
FROM
address does not match the domain.Proposed Solution
Introduce a setting that allows the
FROM
address to be overridden with theReply-To
address or any custom address.- Default this setting to the admin email for backward compatibility.
Reply-To
address does this by default. - Include text explaining best practices for email delivery.
- Show a warning if the
FROM
address does not match the website’s domain.
Example Implementation (Simple)
At
includes/Notification.Email.class.php
line 198, change:$from_email = apply_filters( 'rtb_notification_email_header_from_email', $rtb_controller->settings->get_setting( 'from-email-address' ) );
to:
$from_email = apply_filters( 'rtb_notification_email_header_from_email', $rtb_controller->settings->get_setting( 'reply-to-address' ) );This change would significantly improve email deliverability, making the plugin more reliable in various hosting environments.
References
- Set the admin email to one not matching the website domain (e.g.,
- You must be logged in to reply to this topic.