Mails are basically sent by the thisSession.getTransport("smtp").send() method in the SMTPMailServerImpl class
We have created an MockSMTPMailServer class that extends SMTPMailServerImpl but overrides the getSession() to return our MockSession.
Creating edge cases for this test is difficult because the mail api
tries to stop you doing funky things with nulls, blanks and padded
values for addresses.
This test tests the oddf case where a part has a content-id but is not base64 encoded(aka binary) and therefore
fails to be recognised as a probable inline part.