Hi,
I have used dSendMail2 for almost 2 years, and have been very happy with it. I recently moved the site to a new server with more updated software (CentOS Linux rel 6.3, PHP 5.4.6, exim 4.8.0). It's a virtual hosting setup, so mail usernames often consist of the username and the domain (e.g.,
[email protected]). This wasn't a problem on my old server (which was also a virtual host), but on the new server, dSendMail2 was unable to authenticate when sending via SMTP.
I don't know what part of the new system configuration caused this to break. I discovered that the problem was that dSendMail2 was splitting the username and the domain (or "realm"), and only used the part before the "@" when trying to authenticate with AUTH PLAIN. To fix this, I changed a line in dSendMail2.inc.php as follows:
(somewhere beyond line 2600)
case SASL_PLAIN_EXIM_DOCUMENTATION_MODE:
// $message="\0".$this->credentials["user"]."\0".$this->credentials["password"]; // originally was this
$message="\0".$this->credentials["user"].(strlen($this->credentials["realm"]) ? "@".$this->credentials["realm"] : "")."\0".$this->credentials["password"];
Now it authenticates successfully.
Thanks again to the authors who wrote these classes and made them available to us.
Best regards,
Michael