I have been searching a bug for weeks now – and finally could locate it. However, I need some help how to solve it. The context is an email address confirmation.
Depending on the char-count of the login name, the PHP command quoted_printable_encode() breaks the line before or after a dot which is followed by a newline.
This works …
Ihre E-Mail-Adresse burninleo@abc.net wurde als Kontaktadresse f=C3=BCr das=
Benutzerkonto "abcdefg.abcdef" auf https://www.snipsnapme.com eingetragen.
Falls Sie dieses Benutzerkonto selbst eingerichtet haben, best=C3=A4tigen S=
ie Ihre korrekte E-Mail-Adresse bitte, indem Sie auf folgenden Link klicken=
… while this is trimmed before the dot.
Ihre E-Mail-Adresse burninleo@abc.net wurde als Kontaktadresse f=C3=BCr das=
Benutzerkonto "abcdefg.abcdefg" auf https://www.snipsnapme.com eingetragen=
.
Falls Sie dieses Benutzerkonto selbst eingerichtet haben, best=C3=A4tigen S=
ie Ihre korrekte E-Mail-Adresse bitte, indem Sie auf folgenden Link klicken=
As far as I remember \n+dot+\n+\n is a marker for “end of message” – so it is absolutely clear, why the message is trimmed here. However, it does not seem sensible to replace any =\ndot\n\n by something else because quoted_printable_encode() does misunderstand that.
Is there something I have missed? What?
Thanks for your hints!
BurninLeo
This is the complete message content as sent to PHP’s mail(). As postfix on linux replaces \n by \r\n, the newline character is \n.
--=_SubliminalMessagesInCinemaDontWork
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Guten Tag,
Ihre E-Mail-Adresse burninleo@abc.net wurde als Kontaktadresse f=C3=BCr das=
Benutzerkonto "abcdefg.abcdefg" auf https://www.snipsnapme.com eingetragen=
.
Falls Sie dieses Benutzerkonto selbst eingerichtet haben, best=C3=A4tigen S=
ie Ihre korrekte E-Mail-Adresse bitte, indem Sie auf folgenden Link klicken=
: https://www.snipsnapme.com/admin/act.php?t=3D1234567890ABCDEF
Der Best=C3=A4tigungscode f=C3=BCr Ihre E-Mail-Adresse lautet: 1234567890AB=
CDEF
Falls Sie das Benutzerkonto nicht selbst eingerichtet haben, will m=C3=B6gl=
icherweise eine andere Person Ihre E-Mail-Adresse missbrauchen. In diesem F=
all l=C3=B6schen Sie diese E-Mail bitte einfach.
----------------------------------------------------------
snipsnapme.com - https://www.snipsnapme.com
----------------------------------------------------------
--=_SubliminalMessagesInCinemaDontWork
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<title>Best=C3=A4tigung der E-Mail-Adresse</title>
<style>
body { font-family: verdana, arial, sans-serif }
a.button:link { background-color: #00AA00 }
a.button:visited { background-color: #009900 }
a.button:focus,
a.button:hover,
a.button:active { background-color: #66AA00 }
</style>
</head>
<body>
<p>Guten Tag,</p>
<p>Ihre E-Mail-Adresse <strong>burninleo@abc.net</strong> wurde als Kontakt=
adresse f=C3=BCr
das Benutzerkonto "abcdefg.abcdefg" auf <strong>https://www.snipsnapme.com<=
/strong> eingetragen.</p>
<p>Falls Sie dieses Benutzerkonto selbst eingerichtet haben, best=C3=A4tige=
n Sie
Ihre korrekte E-Mail-Adresse bitte, indem Sie auf folgenden Knopf klicken.<=
/p>
<p style=3D"padding: 20px 0px">
<a href=3D"https://www.snipsnapme.com/admin/act.php?t=3D1234567890ABCDEF" c=
lass=3D"button" style=3D"padding: 10px 20px; margin: 1px; border: 1px solid=
white; outline: 1px solid #00AA00; background-color: #00AA00; color: #FFFF=
FF; text-decoration: none">E-Mail-Adresse best=C3=A4tigen</a>
</p>
<p>Der Best=C3=A4tigungscode f=C3=BCr Ihre E-Mail-Adresse lautet: 123456789=
ABCDEF</p>
<p>Falls Sie das Benutzerkonto <u>nicht</u> selbst eingerichtet haben,
will m=C3=B6glicherweise eine andere Person Ihre E-Mail-Adresse missbrauche=
n.
In diesem Fall l=C3=B6schen Sie diese E-Mail bitte einfach.</p>
<div style=3D"margin-top: 24px; border-top: 2px solid #999999; border-botto=
m: 2px solid #999999; padding: 8px 0px">
snipsnapme.com – <a href=3D"https://www.snipsnapme.com">https://www.s=
nipsnapme.com</a>
</div>
</body>
</html>
--=_SubliminalMessagesInCinemaDontWork--
You have to prepend a
.(dot) to all lines containning only dots.This is a dirty artifact of your transport layer. SMTP is the most probable culprit (see the call for caution in the mail function documentation) but there may be other low level mecanisms that behave similarly. For example if you tweaked the sendmail_path setting or use a buggy
sendmailprogram you may experience similar woes.