Pelesend/actionmailer_x509 — pull request #1 by pavels (2013-08-23 23:44:29+00:00)
Title: encoding fix

You need to call message.body.split! p.body.boundary and fix the newline problem beforehand
If this is not done, than the Content-Transfer-Encoding is not properly set if the original message contained characters which needs encoding (it is set for whole message rather than part because message.body.split the Mail class thinks it is not multipart message but single large message).