summaryrefslogtreecommitdiff
path: root/builtin/commit.c
diff options
context:
space:
mode:
authorAditya Garg <gargaditya08@live.com>2025-04-25 10:09:09 +0000
committerJunio C Hamano <gitster@pobox.com>2025-04-25 10:08:24 -0700
commitd235c468a5d713f8244727d1862eaa1f029b3821 (patch)
tree72b8236cda0a058d42e22318f28b34b34f68327f /builtin/commit.c
parent4bbb303af69990ccd05fe3a2eb58a1ce036f8220 (diff)
send-email: retrieve Message-ID from outlook SMTP server
The script generates a Message-ID alongwith the other headers when gen_header is called, and is sent alongwith the email. For most email providers, including gmail, the Message-ID goes unchanged to the recipient. But, this does not seem to be a case with Outlook. In Outlook, when we send our own Message-ID as a part of the headers, it discards it. Then it generates a new random Message-ID and that is what the recipient gets. This is a problem because the Message-ID is crucial when we are sending multiple emails in a thread. The current implementation for threads in the script replies to the Message-ID it generated, but due to Outlook's behavior, it is not the same as the one that the recipient got, thus breaking threads. So a need arises to retrieve the Message-ID from the server response and set it in the In-Reply-To and References email headers instead of using the self generated one for the purpose of replies. The $smtp->message variable in this script for outlook is something like this: 2.0.0 OK <Message-ID> [Hostname=Some-hostname] The Message-ID here is the one the recipient gets, rather than the one the script generated. This patch uses the fact above and retrieves the Message-ID from the server response. It then changes the value of the $message_id variable to the one received from the server. This value will be used when next and subsequent messages are sent as replies to the message, thus preserving the threading of the messages. Signed-off-by: Aditya Garg <gargaditya08@live.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
0 files changed, 0 insertions, 0 deletions