{
    "mode": "man",
    "parameter": "GIT-IMAP-SEND",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/GIT-IMAP-SEND/1/json",
    "generated": "2026-10-22T13:14:28Z",
    "synopsis": "git imap-send [-v] [-q] [--[no-]curl]",
    "sections": {
        "NAME": {
            "content": "git-imap-send - Send a collection of patches from stdin to an IMAP folder\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "git imap-send [-v] [-q] [--[no-]curl]\n\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This command uploads a mailbox generated with git format-patch into an IMAP drafts folder.\nThis allows patches to be sent as other email is when using mail clients that cannot read\nmailbox files directly. The command also works with any general mailbox in which emails have\nthe fields \"From\", \"Date\", and \"Subject\" in that order.\n\nTypical usage is something like:\n\ngit format-patch --signoff --stdout --attach origin | git imap-send\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-v, --verbose",
                    "content": "Be verbose.\n",
                    "flag": "-v",
                    "long": "--verbose"
                },
                {
                    "name": "-q, --quiet",
                    "content": "Be quiet.\n",
                    "flag": "-q",
                    "long": "--quiet"
                },
                {
                    "name": "--curl",
                    "content": "Use libcurl to communicate with the IMAP server, unless tunneling into it. Ignored if Git\nwas built without the USECURLFORIMAPSEND option set.\n",
                    "long": "--curl"
                },
                {
                    "name": "--no-curl",
                    "content": "Talk to the IMAP server using git’s own IMAP routines instead of using libcurl. Ignored\nif Git was built with the NOOPENSSL option set.\n",
                    "long": "--no-curl"
                }
            ]
        },
        "CONFIGURATION": {
            "content": "To use the tool, imap.folder and either imap.tunnel or imap.host must be set to appropriate\nvalues.\n\nEverything above this line in this section isn’t included from the git-config(1)\ndocumentation. The content that follows is the same as what’s found there:\n\nimap.folder\nThe folder to drop the mails into, which is typically the Drafts folder. For example:\n\"INBOX.Drafts\", \"INBOX/Drafts\" or \"[Gmail]/Drafts\". Required.\n\nimap.tunnel\nCommand used to set up a tunnel to the IMAP server through which commands will be piped\ninstead of using a direct network connection to the server. Required when imap.host is\nnot set.\n\nimap.host\nA URL identifying the server. Use an imap:// prefix for non-secure connections and an\nimaps:// prefix for secure connections. Ignored when imap.tunnel is set, but required\notherwise.\n\nimap.user\nThe username to use when logging in to the server.\n\nimap.pass\nThe password to use when logging in to the server.\n\nimap.port\nAn integer port number to connect to on the server. Defaults to 143 for imap:// hosts and\n993 for imaps:// hosts. Ignored when imap.tunnel is set.\n\nimap.sslverify\nA boolean to enable/disable verification of the server certificate used by the SSL/TLS\nconnection. Default is true. Ignored when imap.tunnel is set.\n\nimap.preformattedHTML\nA boolean to enable/disable the use of html encoding when sending a patch. An html\nencoded patch will be bracketed with <pre> and have a content type of text/html.\nIronically, enabling this option causes Thunderbird to send the patch as a plain/text,\nformat=fixed email. Default is false.\n\nimap.authMethod\nSpecify the authentication method for authenticating with the IMAP server. If Git was\nbuilt with the NOCURL option, or if your curl version is older than 7.34.0, or if you’re\nrunning git-imap-send with the --no-curl option, the only supported method is CRAM-MD5.\nIf this is not set then git imap-send uses the basic IMAP plaintext LOGIN command.\n",
            "subsections": []
        },
        "EXAMPLES": {
            "content": "Using tunnel mode:\n\n[imap]\nfolder = \"INBOX.Drafts\"\ntunnel = \"ssh -q -C user@example.com /usr/bin/imapd ./Maildir 2> /dev/null\"\n\nUsing direct mode:\n\n[imap]\nfolder = \"INBOX.Drafts\"\nhost = imap://imap.example.com\nuser = bob\npass = p4ssw0rd\n\nUsing direct mode with SSL:\n\n[imap]\nfolder = \"INBOX.Drafts\"\nhost = imaps://imap.example.com\nuser = bob\npass = p4ssw0rd\nport = 123\n; sslVerify = false\n\n\nNote\n\nYou may want to use sslVerify=false while troubleshooting, if you suspect that the reason\nyou are having trouble connecting is because the certificate you use at the private\nserver example.com you are trying to set up (or have set up) may not be verified\ncorrectly.\n\nUsing Gmail’s IMAP interface:\n\n[imap]\nfolder = \"[Gmail]/Drafts\"\nhost = imaps://imap.gmail.com\nuser = user@gmail.com\nport = 993\n\n\nNote\n\nYou might need to instead use: folder = \"[Google Mail]/Drafts\" if you get an error that\nthe \"Folder doesn’t exist\".\n\nNote\n\nIf your Gmail account is set to another language than English, the name of the \"Drafts\"\nfolder will be localized.\n\nOnce the commits are ready to be sent, run the following command:\n\n$ git format-patch --cover-letter -M --stdout origin/master | git imap-send\n\nJust make sure to disable line wrapping in the email client (Gmail’s web interface will wrap\nlines no matter what, so you need to use a real IMAP client).\n",
            "subsections": []
        },
        "CAUTION": {
            "content": "It is still your responsibility to make sure that the email message sent by your email\nprogram meets the standards of your project. Many projects do not like patches to be\nattached. Some mail agents will transform patches (e.g. wrap lines, send them as\nformat=flowed) in ways that make them fail. You will get angry flames ridiculing you if you\ndon’t check this.\n\nThunderbird in particular is known to be problematic. Thunderbird users may wish to visit\nthis web page for more information:",
            "subsections": [
                {
                    "name": "http://kb.mozillazine.org/Plain_text_e-mail_-_Thunderbird#Completely_plain_email",
                    "content": ""
                }
            ]
        },
        "SEE ALSO": {
            "content": "git-format-patch(1), git-send-email(1), mbox(5)\n",
            "subsections": []
        },
        "GIT": {
            "content": "Part of the git(1) suite\n\nGit 2.43.0                                   07/02/2025                             GIT-IMAP-SEND(1)",
            "subsections": []
        }
    },
    "summary": "git-imap-send - Send a collection of patches from stdin to an IMAP folder",
    "flags": [
        {
            "flag": "-v",
            "long": "--verbose",
            "arg": null,
            "description": "Be verbose."
        },
        {
            "flag": "-q",
            "long": "--quiet",
            "arg": null,
            "description": "Be quiet."
        },
        {
            "flag": "",
            "long": "--curl",
            "arg": null,
            "description": "Use libcurl to communicate with the IMAP server, unless tunneling into it. Ignored if Git was built without the USECURLFORIMAPSEND option set."
        },
        {
            "flag": "",
            "long": "--no-curl",
            "arg": null,
            "description": "Talk to the IMAP server using git’s own IMAP routines instead of using libcurl. Ignored if Git was built with the NOOPENSSL option set."
        }
    ],
    "examples": [
        "Using tunnel mode:",
        "[imap]",
        "folder = \"INBOX.Drafts\"",
        "tunnel = \"ssh -q -C user@example.com /usr/bin/imapd ./Maildir 2> /dev/null\"",
        "Using direct mode:",
        "[imap]",
        "folder = \"INBOX.Drafts\"",
        "host = imap://imap.example.com",
        "user = bob",
        "pass = p4ssw0rd",
        "Using direct mode with SSL:",
        "[imap]",
        "folder = \"INBOX.Drafts\"",
        "host = imaps://imap.example.com",
        "user = bob",
        "pass = p4ssw0rd",
        "port = 123",
        "; sslVerify = false",
        "Note",
        "You may want to use sslVerify=false while troubleshooting, if you suspect that the reason",
        "you are having trouble connecting is because the certificate you use at the private",
        "server example.com you are trying to set up (or have set up) may not be verified",
        "correctly.",
        "Using Gmail’s IMAP interface:",
        "[imap]",
        "folder = \"[Gmail]/Drafts\"",
        "host = imaps://imap.gmail.com",
        "user = user@gmail.com",
        "port = 993",
        "Note",
        "You might need to instead use: folder = \"[Google Mail]/Drafts\" if you get an error that",
        "the \"Folder doesn’t exist\".",
        "Note",
        "If your Gmail account is set to another language than English, the name of the \"Drafts\"",
        "folder will be localized.",
        "Once the commits are ready to be sent, run the following command:",
        "$ git format-patch --cover-letter -M --stdout origin/master | git imap-send",
        "Just make sure to disable line wrapping in the email client (Gmail’s web interface will wrap",
        "lines no matter what, so you need to use a real IMAP client)."
    ],
    "see_also": [
        {
            "name": "git-format-patch",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/git-format-patch/1/json"
        },
        {
            "name": "git-send-email",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/git-send-email/1/json"
        },
        {
            "name": "mbox",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/mbox/5/json"
        }
    ]
}