HttpMultipart multipart = new HttpMultipart("form-data");
multipart.setParent(message);
FormBodyPart p1 = new FormBodyPart(
"field1",
new InputStreamBody(new FileInputStream(tmpfile), s1 + ".tmp"));
FormBodyPart p2 = new FormBodyPart(
"field2",
new InputStreamBody(new FileInputStream(tmpfile), s2 + ".tmp"));
multipart.addBodyPart(p1);
multipart.addBodyPart(p2);
multipart.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);