Hi @pross ,
Thank you for the detailed explanation and for taking the time to submit the PR we really appreciate the effort and the thoughtful approach with the opt-in filter.
We’ve shared your PR with our development team for review. They’ll evaluate the implementation, especially considering the compatibility concerns you mentioned, and assess how it can be incorporated safely.
We’ll keep you posted once we have feedback from the team.
Hey @pross ,
I appreciate your patience and cooperation while we worked through the issue.
I’m pleased to inform you that our team has resolved it. Please download and install the beta plugin, and share your feedback at your convenience.
Im not sure I understand your fix.
In a previous support thread here it was said that you tried to add angle brackes before and had to remove them as it broke support for something else, so my PR added a filter to allow uses to add the brackets if the desired and leave the default as it was, I gave you a PR for that.
I downloaded the “beta” version and it looks like you are now adding the angle brackets anyway now so breaking backwards compatibility and the filter now does essentially nothing.
private function apply_default_headers( $message ) {
/**
* Filter the Message-ID addr-spec (unbracketed id@domain) before the RFC 5322 header is built.
*
* @since 3.9.2
*
* @param string $addr_spec Message-ID without angle brackets.
*/
$addr_spec = apply_filters( 'post_smtp_message_id', $this->createMessageId() );
$addr_spec = trim( (string) $addr_spec );
$len = strlen( $addr_spec );
if ( $len >= 2 && '<' === $addr_spec[0] && '>' === substr( $addr_spec, -1 ) ) {
$addr_spec = substr( $addr_spec, 1, -1 );
}
$headers[] = 'Message-ID: <' . $addr_spec . '>';
$message->addHeaders( $headers );
}
Hi,
Thank you for your detailed feedback.
Just to clarify the current implementation:
We’ve added the post_smtp_message_id filter around createMessageId(), while keeping the default behavior unchanged to maintain backward compatibility.
This means:
- By default, the Message-ID format remains as it was (no enforced angle brackets globally)
- Users who require angle brackets (e.g., for stricter providers like Google Workspace) can now opt in using the filter, they are no longer forced across all environments
So the intention is to preserve compatibility while still allowing flexibility where needed.
It sounds like the beta you tested may not reflect the latest adjustment. Could you please download and test the updated beta from the link below?
Let us know your findings, your input here is extremely valuable in making sure we get this right across different environments.
Looks like the new version from today uses the filter in the way I suggested now allowing people to opt in and add angle brackets to make the email rfc compliant.
You can close the PR now.
This has been shipped in an offical release.