wrong domain in emails sent by Jetpack
-
I am using Jetpack, JP-Protect and WP-Mail-SMTP.
Recently, I started getting errors with WP-Mail-SMTP sending emails. The interesting thing is that, when I try to send a test mail from the dedicated WP-Mail-SMTP page, it works. It also works when I call
wp_mail
from my own code.Otoh it seems to fail with Jetpack – WP-Mail-SMTP helpfully pinpoints the caller.
The error message from the SMTP server is:
data not accepted.SMTP server error: DATA END command failed Detail: Domain name ‘www.circularrevolution.org’ must be added, and validated, before using it
SMTP code: 551 Additional SMTP info: 5.5.3The ‘www.circularrevolution.org’ is teh address of the website. The smpt server is set up to handle email for ‘circularrevolution.org’, with no www prefix
PS: looking at the dates of those events, they seem to match users having filled in a contact form. I guess that those non-sent emails must be the notifications containing the submitted form data…
PPS: I think the issue is in
class-contact-form.php
line 1246 – there a mail sender address is built as$from_email_addr = 'wordpress@' . $blog_url['host'];
, which seems likely to generate ‘[email protected]’ in our case.Then, on line 1258, this value is used to set a
From:
mail header.It looks like this might be fixable by hooking up to
jetpack_contact_form_email_headers
– but I am surprised that the default From value is built this way…
- You must be logged in to reply to this topic.