globaldev/mailcatcher — pull request #1 by timblair (2012-07-24 12:13:20+00:00)
Title: Handle multiple SMTP messages with one connection.

EventMachine's SMTP server only handles one message per connection. There's an [open pull request](https://github.com/eventmachine/eventmachine/pull/288) which fixes it but it's not been merged in 7 months.

[EventMachine-LE](https://github.com/ibc/EventMachine-LE) is a fork of EventMachine which wraps in a bunch of changes, including the SMTP server fix above. However, EM-LE is based of a newer version of EM that the current gem release, and a combination of changes to [how sockets are closed](https://github.com/eventmachine/eventmachine/commit/6d1cdc53) and how mailcatcher monkeys around with EM's underlying connections to [mount a direct Thin endpoint](https://github.com/sj26/skinny/blob/e48e336d/lib/skinny.rb#L63-70) for the web interface's websocket connection means that every time the WS connection is closed (e.g. you close the browser tab) the mailcatcher server dies.

So, I've decided that pragmaticsm is the best approach, and have monkey patched a fork of mailcatcher to use the older, currently released version of EM to include the changes from the multiple-messages PR.