Skip to content

Commit

Permalink
feat(backend): update hm-ews to support these headers
Browse files Browse the repository at this point in the history
  • Loading branch information
amaninyumu1 committed Jan 29, 2025
1 parent 4264295 commit 10c3670
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/imap/hm-ews.php
Original file line number Diff line number Diff line change
Expand Up @@ -538,9 +538,12 @@ public function get_message_list($itemIds, $include_preview = false) {
'message_id' => $message->get('internetMessageId'),
'x_auto_bcc' => null,
'x_snoozed' => null,
'x_schedule' => null,
'x_profile_id' => null,
'x_delivery' => null,
];
foreach ($message->get('internetMessageHeaders')->InternetMessageHeader as $header) {
foreach (['x-gm-msgid' => 'google_msg_id', 'x-gm-thrid' => 'google_thread_id', 'x-gm-labels' => 'google_labels', 'x-auto-bcc' => 'x_auto_bcc', 'message-id' => 'message_id', 'references' => 'references', 'x-snoozed' => 'x_snoozed', 'list-archive' => 'list_archive', 'content-type' => 'content-type', 'x-priority' => 'x-priority'] as $hname => $key) {
foreach (['x-gm-msgid' => 'google_msg_id', 'x-gm-thrid' => 'google_thread_id', 'x-gm-labels' => 'google_labels', 'x-auto-bcc' => 'x_auto_bcc', 'message-id' => 'message_id', 'references' => 'references', 'x-snoozed' => 'x_snoozed', 'x-schedule' => 'x_schedule', 'x-profile-id' => 'x_profile_id', 'x-delivery' => 'x_delivery', 'list-archive' => 'list_archive', 'content-type' => 'content-type', 'x-priority' => 'x-priority'] as $hname => $key) {
if (strtolower($header->get('headerName')) == $hname) {
$msg[$key] = (string) $header;
}
Expand Down

0 comments on commit 10c3670

Please sign in to comment.