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
Aditya Garg <gargaditya08@live.com>
Date
Jul 22, 2025, 11:24 UTC
Message-ID
<PN3PR01MB95973B291F0A52A19DA8BD49B85CA@PN3PR01MB9597.INDPRD01.PROD.OUTLOOK.COM>
In-Reply-To
<PN3PR01MB9597B8D3D84D9F7660F15E94B85CA@PN3PR01MB9597.INDPRD01.PROD.OUTLOOK.COM>
On 22/07/25 11:44 am, Aditya Garg wrote:
Show 60 quoted lines
> 
> 
> 
> 
> On 22 July 2025 10:39:01 am IST, Junio C Hamano <gitster@pobox.com> wrote:
>> 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.
>>
> 
> Honestly, B2 looks like a doable thing, but I don't think people would really want to use this mode. Considering the fact that using an MSA or SMTP is much better, and commonly used. Also, imap-send was definitely not in use, especially looking that the fact that it was broken for a very long time.
> 
> I'll rename it to imap-sent-folder, but the name looks more like it is only for "Sent" folder, and no other folder can be used. For example I like to keep a copy of the emails I send to git mailing list in a seperate 'git' folder in my mailbox. I can set the folder name as git, and thus have a copy saved there. What do you think about that?
Also, as far as B2 is concerned, users can already do something like:
git format-patch -2 HEAD --to=someone@example.com --stdout | git imap-send

Which is more or less the same what git-send-email would do. The objective to add imap-send to send-email was not to add another feature for sending emails, but rather keep to copy of the sent emails at the desired correct place in their own mailbox.

Previous: Aditya GargNext: Junio C Hamano
Message 11 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.