mirror of https://github.com/M66B/FairEmail.git
Fixed Javamail/allow UTF-8
This commit is contained in:
parent
b39e8c468d
commit
bf19df9c02
|
@ -245,7 +245,7 @@ public class MessageHelper {
|
||||||
System.setProperty("mail.mime.encodefilename", "false");
|
System.setProperty("mail.mime.encodefilename", "false");
|
||||||
System.setProperty("mail.mime.decodeparameters", "true");
|
System.setProperty("mail.mime.decodeparameters", "true");
|
||||||
System.setProperty("mail.mime.encodeparameters", "true");
|
System.setProperty("mail.mime.encodeparameters", "true");
|
||||||
System.setProperty("mail.mime.allowutf8", "false"); // InternetAddress, MimeBodyPart, MimeUtility
|
System.setProperty("mail.mime.allowutf8", "false"); // InternetAddress, (MimeBodyPart: session), MimeUtility
|
||||||
System.setProperty("mail.mime.cachemultipart", "false");
|
System.setProperty("mail.mime.cachemultipart", "false");
|
||||||
|
|
||||||
// https://docs.oracle.com/javaee/6/api/javax/mail/internet/MimeMultipart.html
|
// https://docs.oracle.com/javaee/6/api/javax/mail/internet/MimeMultipart.html
|
||||||
|
|
|
@ -78,8 +78,8 @@ public class MimeBodyPart extends BodyPart implements MimePart {
|
||||||
private static final boolean ignoreMultipartEncoding =
|
private static final boolean ignoreMultipartEncoding =
|
||||||
PropUtil.getBooleanSystemProperty(
|
PropUtil.getBooleanSystemProperty(
|
||||||
"mail.mime.ignoremultipartencoding", true);
|
"mail.mime.ignoremultipartencoding", true);
|
||||||
private static final boolean allowutf8 =
|
//private static final boolean allowutf8 =
|
||||||
PropUtil.getBooleanSystemProperty("mail.mime.allowutf8", true);
|
//PropUtil.getBooleanSystemProperty("mail.mime.allowutf8", true);
|
||||||
|
|
||||||
// Paranoia:
|
// Paranoia:
|
||||||
// allow this last minute change to be disabled if it causes problems
|
// allow this last minute change to be disabled if it causes problems
|
||||||
|
@ -969,7 +969,7 @@ public class MimeBodyPart extends BodyPart implements MimePart {
|
||||||
@Override
|
@Override
|
||||||
public void writeTo(OutputStream os)
|
public void writeTo(OutputStream os)
|
||||||
throws IOException, MessagingException {
|
throws IOException, MessagingException {
|
||||||
writeTo(this, os, null);
|
writeTo(this, os, null, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1620,7 +1620,7 @@ public class MimeBodyPart extends BodyPart implements MimePart {
|
||||||
part.removeHeader("Content-Transfer-Encoding");
|
part.removeHeader("Content-Transfer-Encoding");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void writeTo(MimePart part, OutputStream os, String[] ignoreList)
|
static void writeTo(MimePart part, OutputStream os, String[] ignoreList, boolean allowutf8)
|
||||||
throws IOException, MessagingException {
|
throws IOException, MessagingException {
|
||||||
|
|
||||||
// see if we already have a LOS
|
// see if we already have a LOS
|
||||||
|
|
|
@ -1877,7 +1877,7 @@ public class MimeMessage extends Message implements MimePart {
|
||||||
saveChanges();
|
saveChanges();
|
||||||
|
|
||||||
if (modified) {
|
if (modified) {
|
||||||
MimeBodyPart.writeTo(this, os, ignoreList);
|
MimeBodyPart.writeTo(this, os, ignoreList, allowutf8);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue