I have a CiviCRM on WordPress site and every now and again - maybe once every few months - without me doing anything obvious, the SMTP password gets corrupted in Settings - Outbound Mail.

I'm not sure what is causing this to happen. This is the only site I have that it is happening on. Any ideas?


I might have found the answer while browsing https://docs.civicrm.org/sysadmin/en/latest/requirements/#php-extensions.

PHP Mcrypt [is] required for SMTP credentials and other credentials in the database. If you add Mcrypt on after running CiviCRM for a while you will need to re-save your passwords to the database. [... php7.2] does not support mcrypt and if mcrypt is not installed the smtp password (if entered) will need to be re-saved once you update your php version to 7.2.

I'm reasonably sure that this happened to me multiple times on the same time (that has only been upgraded to php7.2 once) but it certainly feels like a pointer in the right direction.

  • 1
    Yes - I’m reasonably sure too! But agree - that seems like at least part of the answer. Oct 2 '19 at 19:30
  • OK - I will avoid accepting my own answer for now then :) Oct 3 '19 at 9:46
  • Checking smtp pathway is working and retyping passwd (if not working to fix) has been in my ‘upgrade’ a site notes for a long time now dating back to before php7.2 :-) We have not seen it recently though (all servers all sites >=php7.2) - must be b/c Alan is using docker now :-) Oct 3 '19 at 12:04

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.