3

I have some issues with sending out mailings (used to work, now it doesn't anymore). My mailing is failing 100% with a combination of the following errors:

  1. authentication failure [SMTP: Invalid response code received from SMTP server while sending email. This is often caused by a misconfiguration in Outbound Email settings. Please verify the settings at Administer CiviCRM >> Global Settings >> Outbound Ema
  2. Failed to set sender: b.1139.33843.cb2d344bc94b0533@myserver.com [SMTP: Invalid response code received from SMTP server while sending email. This is often caused by a misconfiguration in Outbound Email settings. Please verify the settings at Admi

Regarding the Administer CiviCRM >> Global Settings >> Outbound Ema settings, I have checked these copious times and have verified that they work using the "Save & Send Test Email" function. This for both the mail() and SMTP settings.

I have also tested the actual mailing settings by sending a test to one of my email addresses. This works 100% - which would indicate that the mailing test function uses a different approach to the actual mailing component (this does not make sense for me as it will result in inconsistent results).

Now more to the actual errors:

  1. No idea what's wrong, as the tests pass.
  2. I thought this was a part of the VERP option (server changes the email address) - the SMTP does not recognise the email address and does not allow sending.

When using mail(), the mailing is successfully sent, but most of the emails fall into the very dark hole of the internet - and the ones that get delivered are mostly sent to spam. This is because the reverse DNS look up for my domain is not the same as the IP of my server.

When using SMTP the SMTP server does not recognise the email address I am sending from. And yes, I have switched off the VERP function (I think).

Any ideas what else I can do to get closer to fixing this?

  • I'm seeing something similar. What version of CiviCRM are you using? – Jon G - Megaphone Tech Feb 25 at 19:05
3

I experienced this problem when I was running different versions of PHP in the website and my command line interface (CLI). You can check your PHP version for the web at Administer menu » Administration Console » System Status. You can find your CLI PHP version by running php -v. I was running 7.0 and 7.2 respectively.

Since PHP 7.2 has deprecated the php-mcrypt module, CiviCRM was expecting my mail password to be unencrypted when run from CLI, and encrypted when run from the web interface. So all web-based testing works - but CLI gets authentication errors. The solution is to match your PHP version on web and CLI.

Note that if you move from some lower version to PHP 7.2+, you'll need to re-enter your mail password for things to work.

  • Yup, that was the problem. I've upgraded my site to 7.2 - now both Apache2 and CLI are using that and the mailing executes correctly. – roland Feb 26 at 8:53
  • 1
    This was also our problem, thank you! – Robin Fenwick Jul 5 at 7:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.