Apache Commons Email кодирует прикрепить с помощью base64

Я пытаюсь отправить файл с кодировкой base64 черезapache.commons.mail и я просто не могу шов, чтобы получитьContent-Transfer-Encoding: base64 заголовок, куда он должен идти.

<code>// Create the email
MultiPartEmail email = new MultiPartEmail();
email.setSmtpPort(587);
email.setDebug(false);
email.setHostName("smtp.gmail.com");
email.setAuthentication("[email protected]", "password");
email.setTLS(true);

email.addTo("[email protected]");
email.setFrom("[email protected]");
email.setSubject("subject");

email.attach(new ByteArrayDataSource(
     Base64.encodeBase64(attachFull.getBytes()), "text/plain"), 
     "samplefile.txt", 
     "sample file desc", 
     EmailAttachment.ATTACHMENT
);
</code>

И это то, что попадает к получателю.

<code>------=_Part_0_614021571.1334210788719
Content-Type: text/plain; charset=Cp1252; name=texto.txt
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename=samplefile.txt
Content-Description: sample file desc
</code>

How I can specify that the file is Base64 encoded?

Ответы на вопрос(2)

Ваш ответ на вопрос