Hi,
I'm getting a SMTP error when testing emails via the control panel.
What does the error "SMTP Error: data not accepted" mean? Does it mean Perch successfully connected to the SMTP server, but the server rejected the data?
Hi,
I'm getting a SMTP error when testing emails via the control panel.
What does the error "SMTP Error: data not accepted" mean? Does it mean Perch successfully connected to the SMTP server, but the server rejected the data?
Solved.
The email address PERCH_EMAIL_FROM in config didn't match the SMTP username PERCH_EMAIL_USERNAME.
This happens in PHPMailer, so not my wheelhouse, but the code that throws the exception is this:
So looks like that throws if there's no good recipients of if PHPMailer_SMTP::data() returns false.
That method appears to be the part that actually sends the content of the message over the created SMTP connection. Anything going wrong in that process will result in the above error, including timeouts.
It looks like the connection can be made and authenticated, but for some reason the server isn't accepting the headers and body of the message.
Thanks for taking the time to explain this, Drew.
This is the first time I'm sending emails via Office365. HESK's documentation for setting up Office365 SMTP suggested the from email address should match the SMTP username and that has indeed solved the issue.
So perhaps this is specific to Office365.