Apache Commons Email,如何使用Content-Transfer-Type为quoted-printable发送电子邮件附件?

3

我有一个应用程序,通过发送带有附件的电子邮件与其他服务器进行通信。

我使用Apache Commons Email发送带有附件的电子邮件,如下所示:

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();

问题在于,另一端的人说“标题信息具有Content-Transfer-Encoding值为“7bit”,需要更改为“quoted-printable”。

我的问题是,我该如何进行更改,以使文件以适当的方式附加?

罗布


我有同样的问题!奇怪的是,根据发送邮件的机器/操作系统,Content-transfer-encoding 是不同的!我将使用 HtmlMail 来查看结果。 - marcolopes
1个回答

1

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接