Answers.Body: <p>I narrowed this down to one particular contribution page. Others were working as expected. I don't know what the problem was, but I worked around it by simply creating a replacement for that contribution page. Thanks to everyone who gave this some thought.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-04-07T20:29:46.677Z
Answers.LastActivityDate: 2021-04-07T20:29:46.677Z
Answers.UserDisplayName: The Amateur
Body: <p>We are using CiviCRM 5.35.0, but I have tracked this issue down to the installation of 5.34.0 (updated from 5.33.2). Our CMS is Drupal 7.78. Our PHP is 7.3.27. Our outbound mail setting in CiviCRM is &quot;mail()&quot; and this continues to work for most mailings.</p>
  <p>However, starting right after I installed 5.34, when a contribution is made, CiviCRM does not seem to actually send the expected emails (receipt AND profile submission notifications). In the contact's contribution record, it says that the email receipt was sent, but neither the contact nor myself (I am cc'd on those receipts - setting on the contribution page) gets an email.</p>
  <p>Our Payment processor is Stripe and we are using the Stripe Payment Processor extension version 6.5.7. All extensions are up to date. Stripe continues to send its receipts directly, so at least our users are getting those.</p>
  <p>As far as I know, this issue is only occurring when emails are triggered by a contribution. Otherwise, the system's emails seem to be going out as expected.</p>
  <p>Anybody have any ideas what might be causing this?</p>
  <p>Thanks.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-03-10T23:18:16.410Z
Comments.Text: In civicrm.settings.php there a LOG_MAIL_AND_SEND constant you can define. It might help troubleshoot since then it will log what it thinks it's sending. But the file will get really big on a large site so don't leave it set too long. See https://docs.civicrm.org/dev/en/latest/tools/debugging/#changing-file-based-settings. If you were using smtp I'd say you probably forgot to set up this https://docs.civicrm.org/sysadmin/en/latest/upgrade/version-specific/#civicrm-534, but that shouldn't apply to mail().
Comments.UserDisplayName: Demerit
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-03-12T20:24:11.280Z
Comments.Text: Thanks for the tip Demerit. I have set this up and tested it. Now I just have to wait for someone to make a contribution. But it still seems suspicious to me that this issue would arise right after the installation of 5.34...
Comments.UserDisplayName: The Amateur
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-03-13T19:47:18.457Z
Comments.Text: I can confirm now from the log that the emails are NOT being sent when a contribution is made. So...is this a bug?
Comments.UserDisplayName: The Amateur
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-03-13T23:52:11.033Z
Comments.Text: There's a security release this Wednesday so might want to wait but if you're already on 5.35 it might not make any difference. But you could also try reproducing on http://dmaster.demo.civicrm.org which is 5.37 by duplicating your config there and then setting the outbound mail setting to "Redirect to Database". If an email gets sent it will be under Mailings - Archived Mailings, and then that means either it's fixed in a later release or there's something else odd on your site.
Comments.UserDisplayName: Demerit
Tags: <drupal><civicontribute><email><receipts>
Title: Why are emails not being sent when a contribution is made?
ThreadText: # Why are emails not being sent when a contribution is made?
  
  (Asked by: username_0 on 2021-03-10)
  
  We are using CiviCRM 5.35.0, but I have tracked this issue down to the installation of 5.34.0 (updated from 5.33.2). Our CMS is Drupal 7.78. Our PHP is 7.3.27. Our outbound mail setting in CiviCRM is "mail()" and this continues to work for most mailings.
  
  However, starting right after I installed 5.34, when a contribution is made, CiviCRM does not seem to actually send the expected emails (receipt AND profile submission notifications). In the contact's contribution record, it says that the email receipt was sent, but neither the contact nor myself (I am cc'd on those receipts - setting on the contribution page) gets an email.
  
  Our Payment processor is Stripe and we are using the Stripe Payment Processor extension version 6.5.7. All extensions are up to date. Stripe continues to send its receipts directly, so at least our users are getting those.
  
  As far as I know, this issue is only occurring when emails are triggered by a contribution. Otherwise, the system's emails seem to be going out as expected.
  
  Anybody have any ideas what might be causing this?
  
  Thanks.
  
  **Tags:** drupal, civicontribute, email, receipts
  
  > **Comments:**
  > **username_1**: In civicrm.settings.php there a LOG_MAIL_AND_SEND constant you can define. It might help troubleshoot since then it will log what it thinks it's sending. But the file will get really big on a large site so don't leave it set too long. See https://docs.civicrm.org/dev/en/latest/tools/debugging/#changing-file-based-settings. If you were using smtp I'd say you probably forgot to set up this https://docs.civicrm.org/sysadmin/en/latest/upgrade/version-specific/#civicrm-534, but that shouldn't apply to mail().  
  > **username_0**: Thanks for the tip username_1. I have set this up and tested it. Now I just have to wait for someone to make a contribution. But it still seems suspicious to me that this issue would arise right after the installation of 5.34...  
  > **username_0**: I can confirm now from the log that the emails are NOT being sent when a contribution is made. So...is this a bug?  
  > **username_1**: There's a security release this Wednesday so might want to wait but if you're already on 5.35 it might not make any difference. But you could also try reproducing on http://dmaster.demo.civicrm.org which is 5.37 by duplicating your config there and then setting the outbound mail setting to "Redirect to Database". If an email gets sent it will be under Mailings - Archived Mailings, and then that means either it's fixed in a later release or there's something else odd on your site.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2021-04-07. Score: 2 | Accepted answer
  
  I narrowed this down to one particular contribution page. Others were working as expected. I don't know what the problem was, but I worked around it by simply creating a replacement for that contribution page. Thanks to everyone who gave this some thought.
  
  
  ---
  
  