I use gen_smtp to receive incoming emails. I use :mimemail.decode/1 to parse them, and I've noticed an issue in emails where the subject spans multiple lines in the incoming email.
Here's an example:
From: "Sender" <sender@example.com>
To: "Recipient" <recipient@example.com>
Subject: An email with newlines
in the subject
Content-Type: text/plain; charset="utf-8"
Plain text email goes here!
If you try to decode this, you'll get a subject of An email with newlinesin the subject in the result.
I use gen_smtp to receive incoming emails. I use
:mimemail.decode/1
to parse them, and I've noticed an issue in emails where the subject spans multiple lines in the incoming email.Here's an example:
If you try to decode this, you'll get a subject of
An email with newlinesin the subject
in the result.