0

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.

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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