Progress:
TIER 2 · MODULE 34· Intermediate

git imap-send

Stage email-patches in your drafts folder.

🎯 What & why

Send format-patch output through an IMAP server by dropping it into your Drafts folder. Lets you review and send patches from your normal mail client.

🧠 Mental model

A one-way pipe from format-patch into IMAP APPEND. Git formats the mail, imap-send uploads it as a draft, and your MUA does the actual sending.

🛠️ Synopsis

git imap-send [-v] [-q] [--[no-]curl] < <mbox>

Reads an mbox-format stream on stdin (typically from git format-patch
--stdout) and APPENDs each message to imap.folder. All connection
parameters live in git-config under the imap.* namespace.

🎚️ Switches & options

FlagWhat it does
-v, --verbosePrint the IMAP conversation; essential when auth or TLS is misbehaving.
-q, --quietSuppress per-message progress output.
--curlUse libcurl for the IMAP transport instead of the built-in client.
--no-curlForce the built-in IMAP client even if Git was compiled with curl support.
--nossl⚠️ Disable TLS. Only safe over an already-encrypted tunnel like SSH.

💡 Use cases

🧪 Examples

Configure for a typical IMAPS account
git config imap.host imaps://mail.example.com && git config imap.user alice && git config imap.folder Drafts
Bind to a local tunnel instead of host/port
git config imap.tunnel 'ssh -q user@127.0.0.1 /usr/sbin/imapd'
Pipe a patch series in
git format-patch -M origin/master --stdout | git imap-send -v
Force port and disable strict TLS for a self-signed test box
git config imap.port 993 && git config --bool imap.sslverify false

🎓 Recommendations

🪤 Common pitfalls

🔗 Related modules

📝 Quiz

Hit each option, then Check answers. Score is recorded; Next is always open.