Вопрос

I am new to Perl and I am trying to send an email using the Mail::Sender module with HTML in the body part. I am using debug => 'x.log' to analyze the mail sending process.

It looks like Perl is weirdly putting 3D after each '=' sign and 20 for each space in my HTML code (looks like URL codes for HTML). And after this no email is received at by client. What could be a problem here? (e.g. border="5" becomes border=3D"5")

I am using $sender->SendEnc($BODY); to send message and $sender->Open({to => "$userAtFaultEmail", subject => "$email_subject", ctype => "text/html", encoding => "quoted-printable"'}); to open mail connection.

Это было полезно?

Решение

This is perfectly natural. In the quoted-printable-encoding, the equality sign = is the escape character, so it has to be escaped itself. After the escape character, the hex number of the character is given. Mail clients will decode it correctly. If you dislike this, you can change the encoding, e.g. to UTF-8. However, this is not that common and may produce new issues with legacy clients.

Here is the Wikipedia entry about quoted-printable. The reason for this encoding is to encode 8-bit characters, while email traditionally only transmits 7-bit ASCII.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top