git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v3] send-email: add ability to send a copy of sent emails to an IMAP folder

From
Aditya Garg <gargaditya08@live.com>
Date
Jul 23, 2025, 09:05 UTC
Message-ID
<PN3PR01MB9597EAA61E0E40B027B81DF6B85FA@PN3PR01MB9597.INDPRD01.PROD.OUTLOOK.COM>
In-Reply-To
<da7cee769f25871ed3f934e3ec7f2cccf0a0420c.1753182534.git.gargaditya08@live.com>
On 22/07/25 4:44 pm, Aditya Garg wrote:
Show 23 quoted lines
> 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 the all emails are
> sent via SMTP and the SMTP server has been closed.
> 
> Signed-off-by: Aditya Garg <gargaditya08@live.com>
> ---
> 
> v2 - Fix indentation in patch for imap-send.c
>    - Minor edits to commit message
> 
> v3 - Rename imap folder to imap sent folder
>    - Make an error message shorter by removing unecessary details

I just found a tiny bug here. It is sending emails to IMAP even if --dry-run is present. Will fix in v4. Also, this little bug has also gave me an easier way to implement --use-imap-only, which is what Junio suggested before.

Previous: Aditya GargNext: Aditya Garg
Message 20 of 33 in “send-email: add ability to send a copy of sent emails to an IMAP folder”
  1. send-email: add ability to send a copy of sent emails to an IMAP folderAditya Garg, Jul 20, 2025
  2. send-email: add ability to send a copy of sent emails to an IMAP folderAditya Garg, Jul 21, 2025
  3. Eric SunshineJul 21, 2025
  4. Aditya GargJul 23, 2025
  5. Junio C HamanoJul 21, 2025
  6. brian m. carlsonJul 22, 2025
  7. Aditya GargJul 22, 2025
  8. Aditya GargJul 22, 2025
  9. Junio C HamanoJul 22, 2025
  10. Aditya GargJul 22, 2025
  11. Aditya GargJul 22, 2025
  12. Junio C HamanoJul 22, 2025
  13. Aditya GargJul 22, 2025
  14. Aditya GargJul 22, 2025
  15. Junio C HamanoJul 22, 2025
  16. Aditya GargJul 22, 2025
  17. Junio C HamanoJul 22, 2025
  18. Aditya GargJul 22, 2025
  19. send-email: add ability to send a copy of sent emails to an IMAP folderAditya Garg, Jul 22, 2025
  20. Aditya GargJul 23, 2025
  21. 0/2 send-email: integrate with git imap-sendAditya Garg, Jul 23, 2025
  22. 1/2 send-email: add ability to send a copy of sent emails to an IMAP folderAditya Garg, Jul 23, 2025
  23. 2/2 send-email: enable copying emails to IMAP folder without actually sending themAditya Garg, Jul 23, 2025
  24. Junio C HamanoAug 11, 2025
  25. Aditya GargAug 12, 2025
  26. Aditya GargAug 12, 2025
  27. Junio C HamanoAug 12, 2025
  28. Aditya GargAug 12, 2025
  29. 0/2 send-email: integrate with git imap-sendAditya Garg, Aug 12, 2025
  30. 1/2 send-email: add ability to send a copy of sent emails to an IMAP folderAditya Garg, Aug 12, 2025
  31. 2/2 send-email: enable copying emails to an IMAP folder without actually sending themAditya Garg, Aug 12, 2025
  32. Junio C HamanoAug 12, 2025
  33. Junio C HamanoAug 15, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.