Answers.Body: <p>When using <code>mail()</code> as your mail delivery method, CiviCRM will hand off to <a href="http://php.net/manual/en/function.mail.php" rel="nofollow noreferrer">PHP's <code>mail()</code> builtin</a>, which in turn usually hands over to a local delivery agent (see also <a href="http://php.net/manual/en/mail.configuration.php" rel="nofollow noreferrer">PHP's mail configuration settings</a>).</p>
  
  <p>Unless the WordPress Gmail SMTP plugin does more sleight of hand than I anticipate, it won't get a say in how emails sent via <code>mail()</code> are delivered. WordPress mail plugins typically only get to intercept email routed through WordPress's <code>wp_mail()</code> wrapper. So based on your description (and my assumptions about WP Gmail SMTP), I think what happened is that previously your webserver <em>was</em> able to deliver via <code>mail()</code>, but now it can't.</p>
  
  <p>You can investigate how it <em>did</em> work in the past by comparing the delivery headers of a previous WordPress generated mail (eg new user rego or password reset) with the delivery headers of a previous CiviCRM generated email. I think you'll find that they arrived via different routes.</p>
  
  <p>Why they've stopped arriving is not so obvious. I'd try, in this order -</p>
  
  <ul>
  <li>Check your PHP error log, which may contain more debug info about why <code>mail()</code> failed.</li>
  <li>Check your PHP settings (via <code>phpinfo()</code>) to ensure that the mail configuration settings are correct/appropriate.</li>
  <li>Check if the emails are being routed to junkmail; perhaps your mail host or the webserver config changed and the emails are being delivered but treated as spam. (Since CiviCRM says <code>mail()</code> failed, I don't think this is your problem.)</li>
  <li>Check if the emails are being handled at all by your webserver, by investigating your webserver's mail logs. (How to do this depends on your server / hosting environment, you may need to request access from your hosting provider or contact a technician.)</li>
  <li>Verify that your webserver is capable of delivering emails. (Perhaps some configuration changed, or the MTA daemon died and needs restarting.)</li>
  <li>Verify your SPF / email configuration. (It <em>looks</em> OK from here, but you might find that your server is routing email over IPv6 and your SPF config doesn't handle this; that could lead to you being flagged as junk.)</li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-22T07:14:46.190Z
Answers.Text: I'm aware this isn't a single clear answer, but it's too long for a comment, and I hope it'll help point you in the right direction at least. From the details you've given, I don't think there is a single answer that would be right, but I hope the info re WP Gmail SMTP will assist you finding either the answer, or a better question   Good luck!
Answers.UserDisplayName: Chris Burgess
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-22T07:14:30.630Z
Answers.LastActivityDate: 2017-03-22T07:20:29.533Z
Answers.LastEditDate: 2017-03-22T07:20:29.533Z
Answers.UserDisplayName: Chris Burgess
Body: <p>Using CiviCRM 4.7.14 on WordPress 4.7.3. The configuration uses the default CiviCRM mail() mailer with a WordPress Gmail SMTP plugin.</p>
  
  <p>Everything worked fine until about a week ago, but no configurations were changed. The Gmail SMTP Plugin sends mail successfully, but Civi does not. 
  Any help on where to look would be greatly appreciated.</p>
  
  <p>The error is:</p>
  
  <p>Oops. Your MAIL 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:
  mail() returned failure
  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 Sendmail path is incorrect.
  Your Sendmail argument is incorrect.
  The FROM Email Address configured for this feature may not be a valid sender based on your email service provider rules.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-03-21T08:11:40.993Z
Comments.Text: Can you provide information regarding each and every suggestion that the errors suggests. EG what have you got set for your From address? I understand you are saying 'this worked' so the settings have at some point been okay, and not suggesting they are now not, but it may help others diagnose if you fill in those blanks
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-03-21T13:10:11.000Z
Comments.Text: The only part of the message I left off was this:Mail Not Sent
  Sending test email. FROM: info@vahomeschoolers.org TO: [my personal email].
  
  The email has been the default email since the installation of CiviCRM. I  can't figure out why mail would send from the Gmail SMPT plugin but not civiCRM using the default selection. Truly nothing has changed (as far as I know)
Comments.UserDisplayName: JByrd
Tags: <civimail><email>
Title: Email was sending fine and now has stopped
ThreadText: # Email was sending fine and now has stopped
  
  (Asked by: username_0 on 2017-03-20)
  
  Using CiviCRM 4.7.14 on WordPress 4.7.3. The configuration uses the default CiviCRM mail() mailer with a WordPress Gmail SMTP plugin.
  
  Everything worked fine until about a week ago, but no configurations were changed. The Gmail SMTP Plugin sends mail successfully, but Civi does not.
  Any help on where to look would be greatly appreciated.
  
  The error is:
  
  Oops. Your MAIL 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:
  mail() returned failure
  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 Sendmail path is incorrect.
  Your Sendmail argument is incorrect.
  The FROM Email Address configured for this feature may not be a valid sender based on your email service provider rules.
  
  **Tags:** civimail, email
  
  > **Comments:**
  > **username_1**: Can you provide information regarding each and every suggestion that the errors suggests. EG what have you got set for your From address? I understand you are saying 'this worked' so the settings have at some point been okay, and not suggesting they are now not, but it may help others diagnose if you fill in those blanks  
  > **username_0**: The only part of the message I left off was this:Mail Not Sent Sending test email. FROM: info@vahomeschoolers.org TO: [my personal email].  The email has been the default email since the installation of CiviCRM. I  can't figure out why mail would send from the Gmail SMPT plugin but not civiCRM using the default selection. Truly nothing has changed (as far as I know)  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2017-03-22. Score: 4
  
  When using `mail()` as your mail delivery method, CiviCRM will hand off to [PHP's `mail()` builtin](http://php.net/manual/en/function.mail.php), which in turn usually hands over to a local delivery agent (see also [PHP's mail configuration settings](http://php.net/manual/en/mail.configuration.php)).
  
  Unless the WordPress Gmail SMTP plugin does more sleight of hand than I anticipate, it won't get a say in how emails sent via `mail()` are delivered. WordPress mail plugins typically only get to intercept email routed through WordPress's `wp_mail()` wrapper. So based on your description (and my assumptions about WP Gmail SMTP), I think what happened is that previously your webserver *was* able to deliver via `mail()`, but now it can't.
  
  You can investigate how it *did* work in the past by comparing the delivery headers of a previous WordPress generated mail (eg new user rego or password reset) with the delivery headers of a previous CiviCRM generated email. I think you'll find that they arrived via different routes.
  
  Why they've stopped arriving is not so obvious. I'd try, in this order -
  
  * Check your PHP error log, which may contain more debug info about why `mail()` failed.
  * Check your PHP settings (via `phpinfo()`) to ensure that the mail configuration settings are correct/appropriate.
  * Check if the emails are being routed to junkmail; perhaps your mail host or the webserver config changed and the emails are being delivered but treated as spam. (Since CiviCRM says `mail()` failed, I don't think this is your problem.)
  * Check if the emails are being handled at all by your webserver, by investigating your webserver's mail logs. (How to do this depends on your server / hosting environment, you may need to request access from your hosting provider or contact a technician.)
  * Verify that your webserver is capable of delivering emails. (Perhaps some configuration changed, or the MTA daemon died and needs restarting.)
  * Verify your SPF / email configuration. (It *looks* OK from here, but you might find that your server is routing email over IPv6 and your SPF config doesn't handle this; that could lead to you being flagged as junk.)
  
  > **Comments:**
  > **username_2**: I'm aware this isn't a single clear answer, but it's too long for a comment, and I hope it'll help point you in the right direction at least. From the details you've given, I don't think there is a single answer that would be right, but I hope the info re WP Gmail SMTP will assist you finding either the answer, or a better question   Good luck!  
  
  ---
  
  