Example mail with = problem at the end of quoted-printable

And a workaround for it.
This commit is contained in:
Rick Cobb 2014-02-19 16:13:42 -08:00
parent f575b849a4
commit 295691d625
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,18 @@
To: Blah <blah@blah.com>
From: Me <me@sj26.com>
Subject: Test quoted-printable HTML mail
Mime-Version: 1.0
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<html class=3D"slim"></html>
<p>
Thank you for allowing Grand Rounds to provide a test case that ma=
y demonstrate a limitation in MailCatcher. Open source makes dev good=
</p>
<p>
You can access an error at <a href=3D"http://localhost:9876/big/long/d50=
243b933ddd425">here</a>
</p>=

View File

@ -39,6 +39,9 @@ class MailCatcher::Smtp < EventMachine::Protocols::SmtpServer
end
def receive_message
# See https://github.com/mikel/mail/issues/612 for why the newline is
# added. OTOH: I wonder if it'll screw up multipart.
current_message += "\n"
MailCatcher::Mail.add_message current_message
puts "==> SMTP: Received message from '#{current_message[:sender]}' (#{current_message[:source].length} bytes)"
true