aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorAditya Garg <gargaditya08@live.com>2025-08-12 06:44:35 +0000
committerJunio C Hamano <gitster@pobox.com>2025-08-12 08:59:35 -0700
commit04133f5bc4f3dc7c847f4ba50e02486bcc117d94 (patch)
tree1aa063df97fabe4ddc6439e43d01e16eb3197152 /Documentation
parentThe twelfth batch (diff)
downloadgit-04133f5bc4f3dc7c847f4ba50e02486bcc117d94.tar.gz
git-04133f5bc4f3dc7c847f4ba50e02486bcc117d94.zip
send-email: add ability to send a copy of sent emails to an IMAP folder
Some email providers like Apple iCloud Mail do not support sending a copy of sent emails to the "Sent" folder if SMTP server is used. As a workaround, various email clients like Thunderbird which rely on SMTP, use IMAP to send a copy of sent emails to the "Sent" folder. Something similar can be done if sending emails via `git send-email`, by using the `git imap-send` command to send a copy of the sent email to an IMAP folder specified by the user. Add this functionality to `git send-email` by introducing a new configuration variable `sendemail.imapfolder` and command line option `--imap-folder` which specifies the IMAP folder to send a copy of the sent emails to. If specified, a copy of the sent emails will be sent by piping the emails to `git imap-send` command, after all emails are sent via SMTP and the SMTP server has been closed. Signed-off-by: Aditya Garg <gargaditya08@live.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/config/sendemail.adoc1
-rw-r--r--Documentation/git-send-email.adoc12
2 files changed, 13 insertions, 0 deletions
diff --git a/Documentation/config/sendemail.adoc b/Documentation/config/sendemail.adoc
index 4722334657..dd2dbc87a0 100644
--- a/Documentation/config/sendemail.adoc
+++ b/Documentation/config/sendemail.adoc
@@ -88,6 +88,7 @@ sendemail.smtpServer::
sendemail.smtpServerPort::
sendemail.smtpServerOption::
sendemail.smtpUser::
+sendemail.imapSentFolder::
sendemail.thread::
sendemail.transferEncoding::
sendemail.validate::
diff --git a/Documentation/git-send-email.adoc b/Documentation/git-send-email.adoc
index 5335502d68..d1c41a0dbd 100644
--- a/Documentation/git-send-email.adoc
+++ b/Documentation/git-send-email.adoc
@@ -299,6 +299,18 @@ must be used for each option.
commands and replies will be printed. Useful to debug TLS
connection and authentication problems.
+--imap-sent-folder=<folder>::
+ Some email providers (e.g. iCloud) do not send a copy of the emails sent
+ using SMTP to the `Sent` folder or similar in your mailbox. Use this option
+ to use `git imap-send` to send a copy of the emails to the folder specified
+ using this option. You can run `git imap-send --list` to get a list of
+ valid folder names, including the correct name of the `Sent` folder in
+ your mailbox. You can also use this option to send emails to a dedicated
+ IMAP folder of your choice.
++
+This feature requires setting up `git imap-send`. See linkgit:git-imap-send[1]
+for instructions.
+
--batch-size=<num>::
Some email servers (e.g. 'smtp.163.com') limit the number of emails to be
sent per session (connection) and this will lead to a failure when