Answers.Body: <p>So you have two issues, that are probably not directly connected:</p>
  
  <p>1) mail() working only when 'Save &amp; Send Test Email'
  it uses a different sender (the default site email, as opposed at the one defined as the bounce mailbox)</p>
  
  <p>They are various reasons so the later could fail, the most common ones are that you didn't configure properly the bounce mailbox or that your mail server prevents you to "impersonate" the bounce mailbox (eg if you use a gmail account for the bounce)</p>
  
  <p>The documentation on how to configure is usually helpful, but if you can't walk through the steps, could you create a new question?</p>
  
  <p>2) no smtp connection
  It depends on how your server is configured, check with your host provider what is your smtp server, if it on the same box as your webserver, if it accepts local connections, or if it needs authentication.</p>
  
  <p>if you really have the same error message when you put localhost, try 127.0.0.1, if it works, you might have another problem (wrongly configured dns on the server), because localhost must be seen as a valid address (ie. I was expecting a different error message)</p>
  
  <p>Lastly, what hosting provider are you using? if you went for a "low cost" option (ie. less than 5$/month) you often have providers that actively prevents you to send mass emails and you will spend way more struggling with your server than the cost of switching to a more mass mailing friendly.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-26T10:23:24.050Z
Answers.LastActivityDate: 2015-10-26T10:23:24.050Z
Answers.UserDisplayName: Xavier
Body: <p>I would like to use mailings for our organization. </p>
  
  <p>First, I went to System Settings->Outbound Email Settings and selected mail(). When I clicked 'Save &amp; Send Test Email', the email was properly delivered.</p>
  
  <p>I then went to Mailing->Create New Mailing. I entered a message and clicked 'Send test' under 'Send test email to'. When I did this, I received the error: Error in call to Mailing_send_test : mail() returned failure.</p>
  
  <p>Per some other posts, I did turn on additional debugging support, but that did not change the message displayed or the message that was logged to ConfigAndLog.</p>
  
  <p>My guess was that mail() was the issue and specifying an authorized user via SMTP might work. So, I then went back to System Settings->Outbound Email Settings and selected SMTP. I entered the correct information (trying both SSL and non-SSL) and both times when clicking 'Save &amp; Send Test Email', I recieved a lengty error message: </p>
  
  <p>Sending test email. FROM: mail_sender@ TO: test_recipient@.
  Oops. Your SMTP settings are incorrect. No test mail has been sent.</p>
  
  <p>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.</p>
  
  <p>The mail library returned the following error message:
  Failed to connect to  :25 [SMTP: Failed to connect socket: php_network_getaddresses: getaddrinfo failed: Name or service not known (code: -1, response: )]</p>
  
  <p>I tried replacing the fully qualified domain name with localhost, but that also resulted in the same error message.</p>
  
  <p>Can someone please suggest some steps for me to try to resolve these problems?</p>
  
  <p>Thank you.</p>
  
Tags: <civicrm-home>
Title: Cannot get mailings to work
ThreadText: # Cannot get mailings to work
  
  (Asked by: username_0 on 2015-10-26)
  
  I would like to use mailings for our organization.
  
  First, I went to System Settings->Outbound Email Settings and selected mail(). When I clicked 'Save & Send Test Email', the email was properly delivered.
  
  I then went to Mailing->Create New Mailing. I entered a message and clicked 'Send test' under 'Send test email to'. When I did this, I received the error: Error in call to Mailing\_send\_test : mail() returned failure.
  
  Per some other posts, I did turn on additional debugging support, but that did not change the message displayed or the message that was logged to ConfigAndLog.
  
  My guess was that mail() was the issue and specifying an authorized user via SMTP might work. So, I then went back to System Settings->Outbound Email Settings and selected SMTP. I entered the correct information (trying both SSL and non-SSL) and both times when clicking 'Save & Send Test Email', I recieved a lengty error message:
  
  Sending test email. FROM: mail\_sender@ TO: test\_recipient@.
  Oops. Your SMTP 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:
  Failed to connect to :25 [SMTP: Failed to connect socket: php\_network\_getaddresses: getaddrinfo failed: Name or service not known (code: -1, response: )]
  
  I tried replacing the fully qualified domain name with localhost, but that also resulted in the same error message.
  
  Can someone please suggest some steps for me to try to resolve these problems?
  
  Thank you.
  
  **Tags:** civicrm-home
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-10-26. Score: 1
  
  So you have two issues, that are probably not directly connected:
  
  1) mail() working only when 'Save & Send Test Email'
  it uses a different sender (the default site email, as opposed at the one defined as the bounce mailbox)
  
  They are various reasons so the later could fail, the most common ones are that you didn't configure properly the bounce mailbox or that your mail server prevents you to "impersonate" the bounce mailbox (eg if you use a gmail account for the bounce)
  
  The documentation on how to configure is usually helpful, but if you can't walk through the steps, could you create a new question?
  
  2) no smtp connection
  It depends on how your server is configured, check with your host provider what is your smtp server, if it on the same box as your webserver, if it accepts local connections, or if it needs authentication.
  
  if you really have the same error message when you put localhost, try 127.0.0.1, if it works, you might have another problem (wrongly configured dns on the server), because localhost must be seen as a valid address (ie. I was expecting a different error message)
  
  Lastly, what hosting provider are you using? if you went for a "low cost" option (ie. less than 5$/month) you often have providers that actively prevents you to send mass emails and you will spend way more struggling with your server than the cost of switching to a more mass mailing friendly.
  
  
  ---
  
  