Skip to content

Commit 9498dbc

Browse files
committed
oxcmail: recognize Precedence, Auto-Submitted during import
References: GXH-152
1 parent 12f72a4 commit 9498dbc

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

include/gromox/mapitags.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ enum {
340340
// PR_POST_REPLY_FOLDER_NAMES = PROP_TAG(PT_UNICODE, 0x103E),
341341
// PR_POST_REPLY_DENIED = PROP_TAG(PT_BINARY, 0x103F),
342342
// PR_NNTP_XREF = PROP_TAG(PT_UNICODE, 0x1040),
343-
// PR_INTERNET_PRECEDENCE = PROP_TAG(PT_UNICODE, 0x1041),
343+
PR_INTERNET_PRECEDENCE = PROP_TAG(PT_UNICODE, 0x1041),
344344
PR_IN_REPLY_TO_ID = PROP_TAG(PT_UNICODE, 0x1042), /* PidTagInReplyToId */
345345
PR_IN_REPLY_TO_ID_A = PROP_TAG(PT_STRING8, 0x1042),
346346
PR_LIST_HELP = PROP_TAG(PT_UNICODE, 0x1043), /* PidTagListHelp */

lib/mapi/oxcmail.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1210,6 +1210,15 @@ static BOOL oxcmail_enum_mail_head(const char *key, const char *field, void *ppa
12101210
if (!oxcmail_parse_response_suppress(field,
12111211
&penum_param->pmsg->proplist))
12121212
return FALSE;
1213+
} else if (strcasecmp(key, "Precedence") == 0) {
1214+
if (penum_param->pmsg->proplist.set(PR_INTERNET_PRECEDENCE, field) != ecSuccess)
1215+
return false;
1216+
} else if (strcasecmp(key, "Auto-Submitted") == 0 &&
1217+
strcasecmp(field, "no") != 0) {
1218+
static constexpr uint32_t val = AUTO_RESPONSE_SUPPRESS_AUTOREPLY | AUTO_RESPONSE_SUPPRESS_OOF;
1219+
if (!penum_param->pmsg->proplist.has(PR_AUTO_RESPONSE_SUPPRESS) &&
1220+
penum_param->pmsg->proplist.set(PR_AUTO_RESPONSE_SUPPRESS, &val) != ecSuccess)
1221+
return false;
12131222
} else if (strcasecmp(key, "Content-Class") == 0) {
12141223
if (!oxcmail_parse_content_class(field,
12151224
penum_param->pmail, &penum_param->last_propid,

0 commit comments

Comments
 (0)