1

Using Drupal 7.63 Using CiviCRM 5.9.1

My system had been working fine and I'm not sure what happened except that something in server updates may have broken SMTP. My last bulk mailing went fine and nothing has been changed in CiviCRM since then but SMTP is not working either in CiviCRM or in Drupal (although Drupal is able to send me a message about needed updates).

Here are the log entries from CiviCRM:

1407 Mar 08 13:43:13 [info] $backTrace = #0 /var/www/html/sites/all/modules/civicrm/CRM/Core/Error.php(232): CRM_Core_Error::backtrace("backTrace", TRUE) 1389 Mar 08 13:43:13 [info] $Fatal Error Details = Array 1367 Mar 08 13:43:13 [info] $backTrace = #0 /var/www/html/sites/all/modules/civicrm/CRM/Core/Error.php(962): CRM_Core_Error::backtrace("backTrace", TRUE) 1365 Mar 08 13:43:13 [info] Ignoring exception thrown by nullHandler: 10001, Failed to connect to ssl://smtp-relay.gmail.com:465 [SMTP: Failed to connect socket: Connection timed out (code: -1, response: )] 1342 Mar 08 13:43:13 [info] $backTrace = #0 /var/www/html/sites/all/modules/civicrm/CRM/Core/Error.php(962): CRM_Core_Error::backtrace("backTrace", TRUE) 1340 Mar 08 13:43:13 [info] Ignoring exception thrown by nullHandler: , Failed to connect socket: Connection timed out 1316 Mar 08 13:43:13 [info] $backTrace = #0 /var/www/html/sites/all/modules/civicrm/CRM/Core/Error.php(962): CRM_Core_Error::backtrace("backTrace", TRUE) 1314 Mar 08 13:43:13 [info] Ignoring exception thrown by nullHandler: 110, Connection timed out

Drupal says: phpmailerException: SMTP Error: Could not connect to SMTP host. in PHPMailer->SmtpConnect() (line 810 of /var/www/html/sites/all/modules/smtp/smtp.phpmailer.inc).

  • If you're using google's smtp-relay service are you exceeding the limits? – Demerit Mar 8 at 20:01
  • Haven't sent anything recently (since January) but yes, I'm using smtp-relay.gmail.com as the SMTP server. I've confirmed using a different application that all is set up correctly to use the relay service. I haven't made any changes to the configuration from what worked perfectly in January. I've also noticed that the email I'm using for bounce processing is unable to access the GMail IMAP server. – Stephen Sloan Mar 8 at 20:36
  • Here's another log entry that could be relevant: Notice: Only variable references should be returned by reference in Mail_smtp->getSMTPObject() (line 377 of /var/www/html/sites/all/modules/civicrm/packages/Mail/smtp.php). – Stephen Sloan Mar 8 at 20:37
  • Maybe a firewall change? Can you telnet smtp-relay.gmail.com 465 from the server? – Demerit Mar 8 at 20:42
  • 1
    Thanks, it wasn't the firewall, it was IPv6. I must have disabled it from the command line before but it didn't stay off. I tried your suggestion of telnet from the server and it failed since it was trying an IPv6 address which isn't supported in my setup. Once I disabled IPv6 everything was fine. I also had prior to your message setup Postfix on my server using Google's relay service following a fine recipe here: linode.com/docs/email/postfix/… This worked using mail() on the outbound email settings. – Stephen Sloan Mar 8 at 22:56

Your Answer

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

Browse other questions tagged or ask your own question.