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

Re: Can git send-email support neomutt?

From
Wu Zhenyu <wuzhenyu@ustc.edu>
Date
Nov 6, 2022, 10:17 UTC
Message-ID
<20221106101706.jvgfnzn2jlk73i3f@desktop>
In-Reply-To
<Y2d7B4mUPegaNPU6@tapette.crustytoothpaste.net>
> That program just has to implement a sendmail-compatible interface,
> which neomutt doesn't.  If you want to wrap neomutt in a
> sendmail-compatible interface like you've done, then this can work just
> fine.

Good. The compatibility is important. I'll ask neomutt can them provide an official sendmail-compatible interface. Thanks!

On Sun, Nov 06, 2022 at 09:14:47AM +0000, brian m. carlson wrote:
Show 96 quoted lines
> On 2022-11-06 at 08:58:20, Wu Zhenyu wrote:
> > Thanks for your quick reply.
> 
> Hi, please keep the list in CC.  It's helpful that everyone can benefit
> from seeing the replies, and it's possible someone else might have a
> thought on a good way forward.
> 
> > > You can also use `git format-patch --stdout | neomutt -f -` and that may
> > > provide you the same functionality you were hoping for with
> > > `sendemail.sendmailCmd`.
> > 
> > It cannot use `git send-email -1` I like.
> > 
> > > Mutt and Neomutt are MUAs, which stands for mail user agent.  That is,
> > > they're mail clients that people use to read, compose, and send email.
> > 
> > People can use MUA to send email, the only problem is `-i`. I consider the following method
> 
> Sure, I agree that we can do so.  In fact, as soon as I'm done composing
> this email, I'll be using mutt to send that.
> 
> > ```
> > [sendemail]
> > 	suppresscc = author
> > 	sendmailCmd = git-neomutt
> > ```
> > 
> > `~/.local/bin/neomutt`
> > 
> > ```
> > #!/usr/bin/env bash
> > neomutt "${@//-i/}"
> > ```
> > 
> > And it can work:
> > 
> > ```
> > ❯ git send-email -1
> > /tmp/5441yKUviQ/0001-TEST.patch
> > The following files are 8bit, but do not declare a Content-Transfer-Encoding.
> >     /tmp/5441yKUviQ/0001-TEST.patch
> > Which 8bit encoding should I declare [UTF-8]?
> > To whom should the emails be sent (if anyone)? my-another@email
> > Message-ID to be used as In-Reply-To for the first email (if any)?
> > Logging in...
> > Warning: Fcc to an IMAP mailbox is not supported in batch mode
> > Skipping Fcc to imaps://imaphz.qiye.163.com/Sent
> > OK. Log says:
> > Sendmail: git-neomutt -i my-another@email
> > From: Wu Zhenyu <wuzhenyu@ustc.edu>
> > To: my-another@email
> > Subject: [PATCH] TEST
> > Date: Sun,  6 Nov 2022 16:39:49 +0800
> > Message-Id: <20221106083949.210946-1-wuzhenyu@ustc.edu>
> > X-Mailer: git-send-email 2.38.1
> > MIME-Version: 1.0
> > Content-Type: text/plain; charset=UTF-8
> > Content-Transfer-Encoding: 8bit
> > 
> > Result: OK
> > ```
> 
> There's nothing here preventing you from invoking an arbitrary program.
> That program just has to implement a sendmail-compatible interface,
> which neomutt doesn't.  If you want to wrap neomutt in a
> sendmail-compatible interface like you've done, then this can work just
> fine.
> 
> > I want to know can we remove `-i` to allow more MUA/MTA? If user want to add something, why not let them
> > 
> > ```
> > [sendemail]
> > 	sendmailCmd = msmtp -i
> > ```
> 
> This breaks a lot of the existing tooling which expects that this is a
> sendmail-compatible interface.  In addition, we might add an additional
> value in the future, like -B8BITMIME (which we really should be adding
> if we're sending 8bit data).  The documentation specifically says it
> should be sendmail-like.
> 
> > I think it should be easy to realize.
> 
> I think this is going to cause a bunch of compatibility problems.  git
> send-email is specifically designed to cause email to be sent (i.e., via
> SMTP).  If you want to use another tool to do the sending, that's fine,
> but then you typically want to use git format-patch to provide those to
> the other program.
> 
> > And I'll consider share this tip to neomutt.
> > 
> > Thanks!
> 
> -- 
> brian m. carlson (he/him or they/them)
> Toronto, Ontario, CA
-- 
Best Regards
Wu Zhenyu
Previous: brian m. carlson
Message 5 of 5 in “Can git send-email support neomutt?”
  1. Wu ZhenyuNov 5, 2022
  2. brian m. carlsonNov 5, 2022
  3. Wu ZhenyuNov 6, 2022
  4. brian m. carlsonNov 6, 2022
  5. Wu ZhenyuNov 6, 2022

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.