2

Running CiviCRM 5.13.4 on WordPress current version. Everything had been working then we were informed that the site had stopped sending email. I have been trying to re-establish an SMTP connection ever since with no luck.

  • I have verified the user name and password for the email address using a desktop client
  • I have verified that the ports are open and that the CiviCRM server is not blocked by our firewall.
  • I have cloned the site with similar results, except that the clone can connect only connect on port 587, but the production site can not connect at all.
  • I have been utterly unable to locate any errors from exim, modsecurity or apache on either the CiviCRM server or the mail server.

The only error I get is:

Mail Not Sent Sending test email: From: fppta@mailprocessing.org To: jlyons@rboa.com Oops. Your SMTP settings are incorrect. No test mail has been sent. An error occurred when CiviCRM attempted to send an email (via SMTP). If you received this error after submitting on online contribution or event registration - the transaction was completed, but we were unable to send the email receipt. The mail library returned the following error message: 
> Failed to connect to mail.mailprocessing.org:465 [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 Email (SMTP). (code: -1, response: )] This is probably related to a problem in your Outbound Email Settings (Administer CiviCRM » System Settings » Outbound Email), OR the FROM email address specifically configured for your contribution page or event. Possible causes are: • Your SMTP Username or Password are incorrect. • Your SMTP Server (machine) name is incorrect. • You need to use a Port other than the default port 25 in your environment. • Your SMTP server is just not responding right now (it is down for some reason). • The FROM Email Address configured for this feature may not be a valid sender based on your email service provider rules. Check this page for more information.

Where should I look next?

  • 1
    I know you said the ports are open, but just to double-check if you run openssl s_client -connect mail.server.name:465 from the server does it connect and give you a greeting? – Demerit Sep 11 at 19:46
  • That's one test that I hadn't tried, but it passed with flying colors. I got a rather lengthy and detailed response from the server. The certificate chain looks good, signed by GlobalSign. It looks very complete. Next idea? – LyonsDigital Sep 11 at 20:13
  • Do any of the comments here help civicrm.stackexchange.com/questions/31850/… ? I'm not sure if it's the same problem but seems similar and the general idea is to put debug statements in the code to see exactly where it's failing. Also are there any errors listed in civi's ConfigAndLog folder? – Demerit Sep 11 at 20:27
1

If the same credentials work on one server and not another, there's a good chance that you have php-mcrypt installed on one and not the other. When php-mcrypt is installed, CiviCRM encrypts the SMTP password, and assumes that any passwords are encrypted. This can be a problem if your PHP environment changed (in particular, php-mcrypt is deprecated and it's very unusual to see it used with PHP 7.2).

The fix is to re-enter the SMTP password and resave. Hopefully this solves your problem!

  • Ah yes good thinking. PHP might have got upgraded. – Demerit Sep 11 at 21:00
  • I went digging and discovered the site is running on PHP 7.1 with php-mcrypt. PHP 7.2 is also available on the server. I'll see if the site is stable on PHP 7.2 and if that fixes the problem. Thanks for the insight. – LyonsDigital Sep 12 at 14:11
  • php-mycrypt doesn't seem to be the trouble. Might this help? Sep 12 02:50:07 [info] $backTrace = #0 /home/fpptaweb/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(952): CRM_Core_Error::backtrace("backTrace", TRUE) #1 /home/fpptaweb/public_html/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(922): – LyonsDigital Sep 12 at 19:40
  • 1
    I guess the error got cut off in the comment. Can you edit the original question and paste it in there? – Demerit Sep 12 at 20:48

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.