public static void encodeAddress(ByteBuf buffer, MailAddress address, int posInLine) {
        String name = address.name();
        String addr = address.address();
        if (name == null) {
            buffer.writeBytes(StringUtil.getBytes(addr));
            return;
        }
        if (shouldEncodeQuotedPrintableOrWrap(name, 0)) {
            buffer.writeBytes(StringUtil.getBytes(addr))
                    .writeBytes(StringUtil.getBytes(" ("));
            encodeQuotedPrintableHeader(buffer, name, posInLine + addr.length() + 2);
            buffer.writeByte(')');
            return;
        }
        buffer.writeBytes(StringUtil.getBytes(addr))
                .writeBytes(StringUtil.getBytes(" ("))
                .writeBytes(StringUtil.getBytes(name))
                .writeByte(')');
    }
https://www.rfc-editor.org/rfc/rfc5322#section-3.4
https://www.rfc-editor.org/rfc/rfc5322#section-3.6.2
turms-plugins/turms-plugin-push/src/main/java/im/turms/plugin/push/core/smtp/codec/MailEncoder.java