I have an app that talks to someone else's server by sending emails with attachments.
I used Apache Commons Email to send the email with attachment like so:
MultiPartEmail email = new MultiPartEmail();
email.setHostName(sHostName);
email.addTo("bob@bob.com");
email.addFrom("andy@andy.com");
email.setSubject("the subject");
email.setMsg("the message");
byte[] documentFile = /* ... */;
String filename = "my file.pdf";
String description = "this is my file";
email.attach(new ByteArrayDataSource(myPDF, "application/pdf"), filename, description, EmailAttachment.ATTACHMENT);
email.send();
The problem is, the guy at the other end says "the header info has a Content-Transfer-Encoding value of "7bit" and it needs to be "quoted-printable".
My question is, how do I make this change so the file is attached in the appropriate way?
Rob