Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP PEAR Mail '='

When sending out HTML emails via PEAR, although it renders correctly on email clients, when looking at the message source the text has lots of = signs.

Example

blah blah blah blah blah blah blah blah blah blah blah blah blah blah=blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah=blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah= blah blah blah blah blah blah

Any ideas why and how they can be removed? Do they cause any issues?

like image 737
Homer_J Avatar asked Sep 05 '26 18:09

Homer_J


2 Answers

It is part of the (oldschool but still used!) quoted-printable encoding that represents a 8-bit ASCII string in 7-bit ASC codeset. All characters that are >127 are encoded in the form =F3, which is a hexadecimal representation of the character. Read more at Wikipedia on quoted-printable

To read the message, you must apply quoted_printable_decode() to the string. or use a proper MIME Mail decoder that will resolve other issue's that you will encounter when trying to parse mails, too.

It does not cause issues - it solves them.

like image 146
Kaii Avatar answered Sep 07 '26 06:09

Kaii


They are part of the quoted-printable encoding and must be present in order to read the message properly.

like image 25
Ignacio Vazquez-Abrams Avatar answered Sep 07 '26 08:09

Ignacio Vazquez-Abrams



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!