On our CiviCRM site, the email servers we were using have been unavailable for several days now. WordPress 6.3, CiviCRM 5.64.0, using WP Mail SMTP plugin to avoid problems with our virtual Linux host being seen as less than ideal to send email from by the various spam protection authorities out there). I noticed that when we could no longer connect to the SMTP provider we were using before, this would cause CiviContribution errors. Transactions still pending, even though payment went through, because it could not send the receipt email. Acknowledging the whole "email should work" resolution, which is being worked on already, is there some way to make sure that the contribution workflow does NOT depend on email servers being reachable, within CiviCRM? The workaround until our mail server issue is resolved was to go back to locally sending mail, so the problem is really in the free version (non-profit, etc.) of WP Mail SMTP never returning, causing the php-fpm timeout. But the contribution itself seems to really want to send that email before it marks the transaction as complete, which I think is a bit backwards. Mark transaction complete and then send email. If the email system throws an error, at least the transaction is done and you can resend the receipt later.

Make sense? Any way to change the process so it happens in this order?


Michael Matthews

  • I don't think you can use WP Mail SMTP plugin for CiviCRM emails, so it sounds like you maybe have some kind of external form system in use. Can you give details of how these contributions are being processed?
    – Lars SG
    Aug 21, 2023 at 18:53
  • They may not be specifically for CiviCRM emails, but something about having a new member sign up in CiviCRM triggers emails to be sent (one for receipt of transaction, one for WordPress password reset), before the actual credit card contribution is processed. I'm guessing it's the receipt one here. We don't use any sort of external form. When WP Mail SMTP was pointing to an SMTP server that timed out, users could not finish the signup process (incomplete transaction). When I reconfigured WP Mail SMTP to use local mailer, the contribution process at least worked. Aug 27, 2023 at 17:13
  • Oh, interesting, I guess you can use WP Mail SMTP in that way. I would maybe try it with your mailer configured directly in CiviCRM instead of in WP, just to see if that might be an issue. See Administer > System Settings > Outbound Email.
    – Lars SG
    Aug 27, 2023 at 18:21
  • That's what I did to work around the issue, but that just reintroduces the problem of using the local mailer........ looking for a way to not have to do that. Aug 28, 2023 at 15:06
  • Can't you set up the same SMTP account you use in WP Mail SMTP in Outbound Mail in CiviCRM - with select mailer = SMTP?
    – Lars SG
    Aug 28, 2023 at 15:18

2 Answers 2


It looks like around here, specifically for memberships and depending on the exact details, APIv3 Contribution completetransaction is being used, which includes sending the email, then maybe rolls back the contribution being updates to completed when the email sending fails or something along those lines.

Seems like a bug to me, I'd log it at https://lab.civicrm.org/groups/dev/-/issues/.


Agreed that failing to send emails shouldn't have an effect that disastrous.

I've seen this occasionally over the years, but never tracked it down.

A PR to catch errors while sending receipts would be a Good Thing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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