1

This seems to have started out of nowhere (Drupal 7, CiviCRM 4.2.4, HotDrupal host). Sending test email or actual mailing through cron gives

Sorry but we are not able to provide this at the moment. mail() returned failure".

When I go to the Outbound Mail Settings page and use mail() and hit "save and send test email", it sends fine.

Any ideas?

Here is the log and backtrace message:

Log:

$Fatal Error Details = Array ( 
  [callback] => Array ( 
    [0] => CRM_Core_Error 
    [1] => handle ) 
  [code] => 
  [message] => mail() returned failure 
  [mode] => 16 
  [debug_info] => [type] => PEAR_Error 
  [user_info] => 
  [to_string] => 
  [pear_error: message="mail() returned failure" code=0 mode=callback callback=CRM_Core_Error::handle prefix="" info=""]
)

Backtrace:

$backTrace = 
  #0 /home/tucsonmo/public_html/sites/preservetucson.org/modules/civicrm/CRM/Core/Error.php(196): CRM_Core_Error::backtrace("backTrace", TRUE)
  #1 [internal function](): CRM_Core_Error::handle(Object(PEAR_Error)) 
  #2 /home/tucsonmo/public_html/sites/preservetucson.org/modules/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(PEAR_Error)) 
  #3 /home/tucsonmo/public_html/sites/preservetucson.org/modules/civicrm/packages/PEAR.php(566): PEAR_Error->PEAR_Error("mail() returned failure", NULL, 16, (Array:2), NULL) 
  #4 /home/tucsonmo/public_html/sites/preservetucson.org/modules/civicrm/packages/Mail/mail.php(174): PEAR->raiseError("mail() returned failure") 
  #5 /home/tucsonmo/public_html/sites/preservetucson.org/modules/civicrm/CRM/Mailing/BAO/Job.php(635): Mail_mail->send("Sky Jacobs ", (Array:10), "--=_ff28f9316674a4c0e79be6481d32633d\nContent-Transfer-Encoding: 8bit\nConten...", "661") 
  #6 /home/tucsonmo/public_html/sites/preservetucson.org/modules/civicrm/CRM/Mailing/BAO/Job.php(562): CRM_Mailing_BAO_Job->deliverGroup((Array:1), Object(CRM_Mailing_BAO_Mailing), Object(Mail_mail), "", (Array:0)) 
  #7 /home/tucsonmo/public_html/sites/preservetucson.org/modules/civicrm/CRM/Mailing/BAO/Job.php(159): CRM_Mailing_BAO_Job->deliver(Object(Mail_mail), (Array:7)) 
  #8 /home/tucsonmo/public_html/sites/preservetucson.org/modules/civicrm/CRM/Mailing/Form/Test.php(356): CRM_Mailing_BAO_Job::runJobs((Array:7)) 
  #9 [internal function](): CRM_Mailing_Form_Test::testMail((Array:5), (Array:0), Object(CRM_Mailing_Form_Test)) 
  #10 /home/tucsonmo/public_html/sites/preservetucson.org/modules/civicrm/packages/HTML/QuickForm.php(1598): call_user_func((Array:2), (Array:5), (Array:0), Object(CRM_Mailing_Form_Test)) 
  #11 /home/tucsonmo/public_html/sites/preservetucson.org/modules/civicrm/CRM/Core/Form.php(301): HTML_QuickForm->validate() 
  #12 /home/tucsonmo/public_html/sites/preservetucson.org/modules/civicrm/CRM/Core/StateMachine.php(141): CRM_Core_Form->validate() 
  #13 /home/tucsonmo/public_html/sites/preservetucson.org/modules/civicrm/CRM/Core/QuickForm/Action/Next.php(60): CRM_Core_StateMachine->perform(Object(CRM_Mailing_Form_Test), "next", "Next") 
  #14 /home/tucsonmo/public_html/sites/preservetucson.org/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Next->perform(Object(CRM_Mailing_Form_Test), "next") 
  #15 /home/tucsonmo/public_html/sites/preservetucson.org/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Mailing_Form_Test), "next") 
  #16 /home/tucsonmo/public_html/sites/preservetucson.org/modules/civicrm/CRM/Core/Controller.php(289): HTML_QuickForm_Page->handle("next") 
  #17 /home/tucsonmo/public_html/sites/preservetucson.org/modules/civicrm/CRM/Core/Invoke.php(227): CRM_Core_Controller->run((Array:3), NULL) 
  #18 /home/tucsonmo/public_html/sites/preservetucson.org/modules/civicrm/drupal/civicrm.module(500): CRM_Core_Invoke::invoke((Array:3))
  #19 [internal function](): civicrm_invoke("mailing", "send") 
  #20 /home/tucsonmo/public_html/includes/menu.inc(519): call_user_func_array("civicrm_invoke", (Array:2)) 
  #21 /home/tucsonmo/public_html/index.php(21): menu_execute_active_handler() 
  #22 {main}

1 Answer 1

5

What is the mail account you have configured for bounces? Is this the same domain name as the default one in your civi? (check who is the sender of the test when you are sending it from the outbound setting page)

It might be that you have different domain names and that your hosting provider refuses to send the "normal" mails

For instance, you can't put a gmail address as the bounce mailbox, it will not work.

Try to switch to smtp and localhost server, it might be a workaround (but you still need to configure your bounce mailbox).

Bit of technical background: when you send an email with civimail, the actual "technical" sender is the email you have configured as the mail account to receive the bounces.

So if you send your mailing as [email protected] but have [email protected] as your mailbox for bounce, it will use [email protected] as the sender

The receiver will still see [email protected], but the mail servers (yours or the recipient) will know [email protected] is the mailbox they need to reach if there is a problem (invalid email, mailbox full...).

So it's likely that your host provider doesn't allow you to "impersonate" the bounce email (and so you need to fix the bounce account).

Or, they might have tightened their security rule and forbid you to impersonate any email, in that case, you won't be able to use civimail until they fix that... or that you switch to a different host provider.

2
  • Xavier... thank you so much for your response! I had not looked at the bounce email because it had been set up years ago and has always worked fine. Somehow (a total mystery, since I am the only active admin) the bounce email had completely disappeared. Once I added one, things so far appear to be working again. Thanks for the extended info as well... good to understand how CiviMail works and why restrictions at some hosts can cause sudden problems. Thanks again for taking time to help people.
    – desierto
    Jun 3, 2015 at 15:39
  • "when you send an email with civimail, the actual "technical" sender is the email you have configured as the mail account to receive the bounces." - This was not immediately intuitive! Thanks. Jul 2, 2015 at 17:41

Your Answer

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

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