Two identical strings, yet different lengths. Trimmed, cleansed, etc
try
var_dump(bin2hex($str1));
var_dump(bin2hex($str2));
or with
var_dump(htmlspecialchars($str1));
var_dump(htmlspecialchars($str2));
to inspect what's different, once found, paste here the different bits so we can figure out where the difference is from.
EDIT:
It's a &
encoded as &
notice that &
<-> &
are 4 chars different. what I think is going on is that you are sending a plain text emails, but entitizing the string, thus all &
are becoming &
.