I recently learned that webmail clients like Gmail will do alterations on HTML emails, for example adding target=\"_blank\" to tags.
target=\"_blank\"
Emailing in html uses Quoted-printable Encoding. The problem with your $mailContent is that the "=" must be represented by =3D
Try adding this: $mailContent = quoted_printable_encode($mailContent);