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., firstname.lastname@example.org). 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)
// $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.
Joshua Parker - 2013-01-13 14:10:51 - In reply to message 1 from Michael Hosford
@Michael, quick question for you. Are you using this class as a mass mailer to a group of recipients? If so, did you run into any issues with every recipient being able to see who the email was sent to? Thanks.
Michael Hosford - 2013-01-14 04:54:48 - In reply to message 2 from Joshua Parker
Yes, I use dSendMail2 to send to a mailing list, and no, recipients cannot see the list of email addresses. The trick is to use the setBcc() method. I do something like this ($recipients is an array of email addresses):
$m = new dSendMail2;
$m->setSubject("Message from the Mailing List");