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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 22, 2025, 05:09 UTC
Message-ID
<xmqq4iv4x15e.fsf@gitster.g>
In-Reply-To
<PN3PR01MB95976A7BE0F9A54E836FA2F5B85CA@PN3PR01MB9597.INDPRD01.PROD.OUTLOOK.COM>
Aditya Garg <gargaditya08@live.com> writes:
> Or maybe you mean, ONLY send via imap and don't use SMTP? Like
> this users can use their email clients to send emails?

Exactly. You sold this feature as "have send-email send the message, and keep an extra copy you sent in your Sent imap folder".

I pointed out that "have send-email do everything it would normally do before it talks to MSA or talk SMTP to send messages out, and instead drive imap-send to store these messages in a folder like imap-send users have used the program so far---as the user will send the messages out of their draft folder as was traditionally done by any imap-send users, send-email will *not* send anything out itself" as a possible different way send-email may want to use imap-send.

These are two very different use cases. We could organize things this way:

 A1. When imap-folder is specified, that IMAP folder will get an extra
     copy, in addition to what send-email sends out;
 A2. When yet another new option, --send-email-no-send, is
     specified, send-email would not send any messages out.  Even
     when this option is in effect, if --imap-folder is specified,
     that IMAP folder will get an extra copy, in addition to what
     send-email would send out (which is nothing).

Or alternatively, we can have two very different operation modes that both involve imap-send:

 B1. When --imap-sent-folder is specified, that IMAP folder will get
     an extra copy, in addition to what send-email sent out via its
     usual route (like by invoking MSA or talking SMTP)
 B2. When --imap-outgo-folder is specified, that IMAP folder will
     get the outgo copy, later to be sent by the user (just like a
     user of imap-send would usually use), and send-email would not
     send out anything by its usual route.

I thought the latter would be easier to explain to end-users, which is why "sent" or "fcc" or something like that should be in the name of the option when operating in the mode the patch implements.

This brings up a yet another possibility. Invoking imap-send can be a new third way send-email uses to send out the messages, in addition to existing (1) invoking a local "/usr/lib/sendmail" program, or (2) talking SMTP to smarthost. That would be very easy to explain the operating mode B2 to users of send-email or users of imap-send, but it would be a bit awkward to find where B1 conceptually fits.

Previous: Aditya GargNext: Aditya Garg
Message 9 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.