I've been using PHPMailer without too many issues, but the last request I received had me spending hours without a solution. No one else seems to have had that issue and not a single example can be found online.
We generate the HTML email in real time because it has to be populated by some calculated field, so no import from a file. I've been asked to insert an ordinary signature with the usual standard prefix "-- ". The problem is: no matter what I try, no email client recognizes the signature block.
I'm aware that it usually is just an ordinary dash dash space . No rocket science here. Yet...
Some solution I tried, sparsed:
$body .= "-- ";
$body .= "-- <br>";
$body .= "-- " . PHP_EOL;
$body .= "<p>-- </p>";
$body .= "--
";
$body .= "--
<br>";
$body .= "--
" . PHP_EOL;
$body .= "<p>--
</p>";
$body .= "--
";
$body .= "--
<br>";
$body .= "--
" . PHP_EOL;
$body .= "<p>--
</p>";
$body .= "--
";
$body .= "--
<br>";
$body .= "--
" . PHP_EOL;
$body .= "<p>--
</p>";
$body .= "--
";
$body .= "--
<br>";
$body .= "--
" . PHP_EOL;
$body .= "<p>--
</p>";
$body .= "--
";
$body .= "--
<br>";
$body .= "--
" . PHP_EOL;
$body .= "<p>--
</p>";
And many more. Like 200 more.
Probably the answer is a simple thing that I missed, but I'm completely lost right now.
[ Sorry for my english ]
[EDIT]
1) What I expect from the client when it encounters the block -> that it recognizes it as a signature. That means that Gmail will put "..." while Thunderbird (in my case and with my settings) would plain cut it in the reply.
Before: https://i.stack.imgur.com/2YaCK.png After: https://i.stack.imgur.com/haWIi.png
2) Which clients did you check? -> Gmail and TB.
3) Manual check -> Yes of course. My email has one and I'm 100% certain that it works.
What I noticed in Gmail is that, in "Show original", an ordinary mail is like this one:
*aaa*
*dsadfv*
vsdfv <http://www.google.com>
fdvsdfv
--
dsfgsdfv
While mine is always a variation of this one:
<br>-- =20
What I mean is that not a single line begins with the double dash but is always preceded but the previous line separator, plus it ends with =20 that Gmail uses as a return.