Hm, now that I've got that info, I can't remember what I wanted to know the output of stream_get_filters() for! :) Looking at the code, I think maybe it's because the presence or absence of the "convert.*" filter determines whether or no phpmailer sends the email text through a particular converter function or not. But you've got "convert.*", and I've also got it on my local machine (where this code works fine) so that doesn't seem to be the cause of the problem.
I think your workaround of setting localhost:25 fixes the problem because it causes the email to be sent by class.smtp.php rather than class.phpmailer.php.
Thanks Mike!
Hm, now that I've got that info, I can't remember what I wanted to know the output of stream_ get_filters( ) for! :) Looking at the code, I think maybe it's because the presence or absence of the "convert.*" filter determines whether or no phpmailer sends the email text through a particular converter function or not. But you've got "convert.*", and I've also got it on my local machine (where this code works fine) so that doesn't seem to be the cause of the problem.
I think your workaround of setting localhost:25 fixes the problem because it causes the email to be sent by class.smtp.php rather than class.phpmailer .php.
So, it looks like this is, in fact, a phpmailer bug. I see that phpmailer is up to version 5.2.6 now ( https:/ /github. com/PHPMailer/ PHPMailer/ blob/master/ changelog. md ). I wonder if they've solved this bug in the newer versions.