diff --git a/src/java/davmail/imap/ImapConnection.java b/src/java/davmail/imap/ImapConnection.java index 075a8779..57d3faea 100644 --- a/src/java/davmail/imap/ImapConnection.java +++ b/src/java/davmail/imap/ImapConnection.java @@ -900,7 +900,9 @@ public class ImapConnection extends AbstractConnection { } protected void appendEnvelopeHeader(StringBuilder buffer, String[] value) { - buffer.append(' '); + if (buffer.charAt(buffer.length() - 1) != '(') { + buffer.append(' '); + } if (value != null && value.length > 0) { String unfoldedValue = MimeUtility.unfold(value[0]); if (unfoldedValue.indexOf('"') >= 0) {