CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • HELO error using Mandrill SMTP
Pages: [1]

Author Topic: HELO error using Mandrill SMTP  (Read 1300 times)

jonathankissam

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 4.4.4
  • CMS version: Drupal
  • MySQL version: 5.5.35-MariaDB-log
  • PHP version: 5.3.17
HELO error using Mandrill SMTP
June 10, 2014, 01:18:35 pm
I am working with a CiviCRM/Drupal setup which we just moved to Pantheon's hosting.  I am trying to set it up to use Mandrill for transactional emails, but receiving the error message below when I test it.  My best guess is that it a similar problem to the following threads (which don't have any resolution) - i.e., Civi and/or Drupal are sending localhost on the HELO message instead of the proper domain:

http://forum.civicrm.org/index.php/topic,17094.0.html

http://forum.civicrm.org/index.php/topic,7806.0.html

Anyone out there have any idea where in CiviCRM I can change the configuration so it sends from the proper domain instead of localhost (or, have an idea of what else might be causing the problem?)

Thanks!

Error Message:

Quote
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 smtp.mandrillapp.com:587 [SMTP: HELO was not accepted: (code: 401, response: Syntax: HELO hostname)]
This is probably related to a problem in your Outbound Email Settings (Administer CiviCRM » System Settings » Outbound Email), OR the FROM email address specifically configured for your contribution page or event. Possible causes are:
Your SMTP Username or Password are incorrect.
Your SMTP Server (machine) name is incorrect.
You need to use a Port other than the default port 25 in your environment.
Your SMTP server is just not responding right now (it is down for some reason).
The FROM Email Address configured for this feature may not be a valid sender based on your email service provider rules.

jonathankissam

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
  • CiviCRM version: 4.4.4
  • CMS version: Drupal
  • MySQL version: 5.5.35-MariaDB-log
  • PHP version: 5.3.17
Re: HELO error using Mandrill SMTP
June 23, 2014, 11:59:50 am
OK, figured out what the problem was:

CRM_Core_Config::getMailer, sets the "localhost" parameter for the PEAR Mail object by trying to load the server name from $_SERVER['SERVER_NAME'], and if that's not set, defaults to "localhost."  The "localhost" parameter is used for the HELO message, which is the first thing sent with an SMTP request (and, in this case, was being rejected by Mandrill).

Problem is, Pantheon's server set up does not define $_SERVER['SERVER_NAME'] (or rather, it defines it as a blank string) - so it was either serving a HELO message of "HELO localhost" or just "HELO "

So, for a short-term solution, I had to hack the class definition for CRM_Core_Config::getMailer (at CRM/Core/Config.php, line 548) to directly define the server name.  Once I have time to figure out how to programatically access the server name on Pantheon's servers, I can make a patch (though would be more than happy for someone else to do that as well).

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • HELO error using Mandrill SMTP

This forum was archived on 2017-11-26.