Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.7.12
-
Fix Version/s: 4.7.25
-
Component/s: CiviMail
-
Labels:
-
Versioning Impact:Patch (backwards-compatible bug fixes)
-
Documentation Required?:None
-
Funding Source:Contributed Code
-
Verified?:No
-
Overview:
-
How it works currently:
-
How it should work:
Description
This problem relates to the following code in CRM_Utils_Mail::createMailer() ...
$params['localhost'] = CRM_Utils_Array::value('SERVER_NAME', $_SERVER, 'localhost');
When being executed by the CLI, 'SERVER_NAME' is unset so the mailer will identify itself as "localhost" in SMTP EHLO or HELO commands.
In our experience using G Suite for Non-profits, Google rejects these emails. The problem rights itself when we replace "localhost" with our host name.
I'll supply a patch that gets the host from CIVICRM_UF_BASEURL if SERVER_NAME is unset.