8

I recently upgraded my site to 4.7.1. Outbound SMTP does not work. Even though I use the correct credentials, I get errors and email does not send. I restored my site back to 4.6, and all is good.

Tried testing on your sandbox, but 4.7 is not available yet.

  • What error do you get? could you put the detail in your question? And can you clarify if the error happens both for transactional emails and civimail? As the availability of the demo/sandbox for 4.7: sending emails is disabled there, so it won't help sorting out your problem – Xavier Feb 8 '16 at 9:49
  • I also have problems since 4.7.1 with SMTP. It seems that my provider wants authentication without TLS, but there seems to be no way to configure that. The summary of the "test" is as follows: With SSL and using port 465 I get the message: "Failed to connect to ssl://smtp.mail-ch.ch:465 [SMTP: Failed to connect socket: Connection timed out (code: -1, response: )]". Without SSL and using port 587, I get: "authentication failure [SMTP: STARTTLS failed (code: 220, response: 2.0.0 Ready to start TLS)]". Wordpress is the newest, civicrm v4.7.1, and it's running under PHP v5.6. Is V4.7.2 a fix? – David Christie Feb 29 '16 at 19:40
  • An answer I posted here has been linked to this question. However I doubt that these two questions are duplicates as this one is due to CiviCRM upgrade and the other is due to server package update. Unless php is also updated in this scenario, it is better to keep this question here. Otherwise we should mark this duplicated after the action in this answer is approved by core team. – Guanhuan Apr 7 '16 at 13:34
  • My hosting provider, Civihosting, moved us from PHP 5.5 to PHP 5.6 on 4/11 and this morning one of our folks ran into what seems like the same problem with civimcil. When sending a test of an unscheduled mailing, he receives the error: Error in call to Mailing_send_test: STARTLLS failed So this looks like the issue is the PHP version. When we have more info, we will post it. – Rick Cunningham Apr 12 '16 at 12:30
  • Confirmed with Civi 4.7.10 on Joomla 3.6.2 on PHP 5.6. Rolled back to PHP 5.5.38 and SMTP works again. This is a qualified bug. – BruceW Aug 9 '16 at 1:53
6

From what I understand, this can be because the server you contact has a self-signed certificate (see this question for a workaround), or because the PEAR SMTP package version used by CiviCRM does not support TLS. Civi uses 1.6.1, but support was added in 1.7.1.

In our case (php7, CiviCRM 4.7), we are able to work around this by forcing SSL connection rather than TLS. In the Outbound mail settings 1) put ssl:// in front of the mail server name 2) change the port to something appropriate. Usually to 465**

  • +1 self signed. I created a certificate for my server from LetsEncrypt changed the server name in CiviCRM from localhost to my.real-server-name.com and it was happy. CiviCRM 5.3.1 PHP 7.0 – artfulrobot Oct 29 '18 at 14:03
2

Same error with CiviCRM 4.7.4, Drupal :

authentication failure [SMTP: STARTTLS failed (code: 220, response: 2.0.0 continue)].

Using mail() allows us to send mails, but with the local SMTP server.

Downgrading to PHP5.5 resolves this problem. With PHP5.6 the problem is in packages/Net/SMTP.php when calling $this->_socket->enableCrypto()

This is due to php 5.6 : https://civicrm.stackexchange.com/a/10966

0

Seems there is some work in progress to attach this on CRM-18408 SMTP connection via SSL and TLS in PHP 5.6

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.