diff --git a/examples/quoted_printable_htmlmail b/examples/quoted_printable_htmlmail new file mode 100644 index 0000000..c338035 --- /dev/null +++ b/examples/quoted_printable_htmlmail @@ -0,0 +1,18 @@ +To: Blah +From: Me +Subject: Test quoted-printable HTML mail +Mime-Version: 1.0 +Content-Type: text/html; + charset=UTF-8 +Content-Transfer-Encoding: quoted-printable + + +

+Thank you for allowing Grand Rounds to provide a test case that ma= +y demonstrate a limitation in MailCatcher. Open source makes dev good= + +

+

+You can access an error at here +

= diff --git a/lib/mail_catcher/smtp.rb b/lib/mail_catcher/smtp.rb index ee7356d..e0ab752 100644 --- a/lib/mail_catcher/smtp.rb +++ b/lib/mail_catcher/smtp.rb @@ -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