2016-10-11, 08:52 PM
This is sort of a bug, but it's easily fixed by adding this setting.
In the inc/mailhandlers/smtp.php file, $this->helo is set by first trying gethostname(), then php_uname('n'), and finally setting it to $_SERVER['SERVER_NAME'].
The problem with this is that Google Apps requires the $this->helo value to be set to the domain of the email being used. If the gethostname() or php_uname('n') functions return anything other than that domain (which is entirely likely, especially on shared hosting), then Google Apps won't work.
The only way I was able to get Google Apps working without changing the server hostname was to manually set the value in the file:
$this->helo = 'example.com';
This would be better implemented as a MyBB setting. If the setting is blank, MyBB could fall back to the original method of getting the server hostname.
In the inc/mailhandlers/smtp.php file, $this->helo is set by first trying gethostname(), then php_uname('n'), and finally setting it to $_SERVER['SERVER_NAME'].
The problem with this is that Google Apps requires the $this->helo value to be set to the domain of the email being used. If the gethostname() or php_uname('n') functions return anything other than that domain (which is entirely likely, especially on shared hosting), then Google Apps won't work.
The only way I was able to get Google Apps working without changing the server hostname was to manually set the value in the file:
$this->helo = 'example.com';
This would be better implemented as a MyBB setting. If the setting is blank, MyBB could fall back to the original method of getting the server hostname.