part.setDisposition( "form-data; name=\"" + name + "\"; filename=\"" + attachment.getName() + "\"" );
}
else
part.setDisposition( "form-data; name=\"" + attachment.getName() + "\"" );
part.setDataHandler( new DataHandler( new AttachmentDataSource( attachment ) ) );
formMp.addBodyPart( part );
}
MimeMessage message = new MimeMessage( AttachmentUtils.JAVAMAIL_SESSION );