class MailUtil {

	private static MimeMessage readMime(InputStream is) throws MessagingException {
		Properties props = System.getProperties();
		props.put("mail.transport.protocol", "smtp");
		props.put("mail.smtp.provider.class", CustomTransport.class.getName());
		props.put("mail.smtp.provider.vendor", "foo");
		props.put("mail.smtp.provider.version", "0.0.0");
		// props.put("mail.host", "smtp.unexisting.com");
		props.put("mail.transport.protocol", "smtp");

		try {
			Session mailSession = Session.getInstance(props, null);
			MimeMessage msg = new MimeMessage(mailSession, is);
			return msg;
		} catch (Throwable t) {
			t.printStackTrace();
		}
		return null;
	}

}