Answers.Body: <p>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)</p>
  
  <p>It might be that you have different domain names and that your hosting provider refuses to send the "normal" mails</p>
  
  <p>For instance, you can't put a gmail address as the bounce mailbox, it will not work.</p>
  
  <p>Try to switch to smtp and localhost server, it might be a workaround (but you still need to configure your bounce mailbox). </p>
  
  <p>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. </p>
  
  <p>So if you send your mailing as bob@example.org but have bounce@example.org as your mailbox for bounce, it will use bounce+b+lotsofstuff@example.org as the sender</p>
  
  <p>The receiver will still see bob@example.org, but the mail servers (yours or the recipient) will know bounce@example.org is the mailbox they need to reach if there is a problem (invalid email, mailbox full...).</p>
  
  <p>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).</p>
  
  <p>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.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-03T15:39:53.937Z
Answers.Text: 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.
Answers.UserDisplayName: desierto
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-02T17:41:41.767Z
Answers.Text: "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.
Answers.UserDisplayName: Sonicthoughts
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-03T08:48:45.203Z
Answers.LastActivityDate: 2015-06-03T08:48:45.203Z
Answers.UserDisplayName: Xavier
Body: <p>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</p>
  
  <blockquote>
    <p>Sorry but we are not able to provide this at the moment. mail() returned failure".</p>
  </blockquote>
  
  <p>When I go to the Outbound Mail Settings page and use mail() and hit "save and send test email", it sends fine.</p>
  
  <p>Any ideas?</p>
  
  <p>Here is the log and backtrace message:</p>
  
  <p>Log: </p>
  
  <pre><code>$Fatal Error Details = Array ( 
    [callback] =&gt; Array ( 
      [0] =&gt; CRM_Core_Error 
      [1] =&gt; handle ) 
    [code] =&gt; 
    [message] =&gt; mail() returned failure 
    [mode] =&gt; 16 
    [debug_info] =&gt; [type] =&gt; PEAR_Error 
    [user_info] =&gt; 
    [to_string] =&gt; 
    [pear_error: message="mail() returned failure" code=0 mode=callback callback=CRM_Core_Error::handle prefix="" info=""]
  )
  </code></pre>
  
  <p>Backtrace: </p>
  
  <pre><code>$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-&gt;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-&gt;raiseError("mail() returned failure") 
    #5 /home/tucsonmo/public_html/sites/preservetucson.org/modules/civicrm/CRM/Mailing/BAO/Job.php(635): Mail_mail-&gt;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-&gt;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-&gt;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-&gt;validate() 
    #12 /home/tucsonmo/public_html/sites/preservetucson.org/modules/civicrm/CRM/Core/StateMachine.php(141): CRM_Core_Form-&gt;validate() 
    #13 /home/tucsonmo/public_html/sites/preservetucson.org/modules/civicrm/CRM/Core/QuickForm/Action/Next.php(60): CRM_Core_StateMachine-&gt;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-&gt;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-&gt;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-&gt;handle("next") 
    #17 /home/tucsonmo/public_html/sites/preservetucson.org/modules/civicrm/CRM/Core/Invoke.php(227): CRM_Core_Controller-&gt;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}
  </code></pre>
  
Tags: <civimail>
Title: Email and test email fail, but Outbound Mail Settings page sends test through mail() fine
ThreadText: # Email and test email fail, but Outbound Mail Settings page sends test through mail() fine
  
  (Asked by: username_0 on 2015-06-03)
  
  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}
  
  **Tags:** civimail
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-06-03. Score: 5 | Accepted answer
  
  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 bob@example.org but have bounce@example.org as your mailbox for bounce, it will use bounce+b+lotsofstuff@example.org as the sender
  
  The receiver will still see bob@example.org, but the mail servers (yours or the recipient) will know bounce@example.org 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.
  
  > **Comments:**
  > **username_0**: username_1... 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.  
  > **username_2**: "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.  
  
  ---
  
  