Documentation / git-imap-send.txton commit Merge branch 'mg/detached-head-report' (38f6ae9)
   1git-imap-send(1)
   2================
   3
   4NAME
   5----
   6git-imap-send - Send a collection of patches from stdin to an IMAP folder
   7
   8
   9SYNOPSIS
  10--------
  11[verse]
  12'git imap-send' [-v] [-q] [--[no-]curl]
  13
  14
  15DESCRIPTION
  16-----------
  17This command uploads a mailbox generated with 'git format-patch'
  18into an IMAP drafts folder.  This allows patches to be sent as
  19other email is when using mail clients that cannot read mailbox
  20files directly. The command also works with any general mailbox
  21in which emails have the fields "From", "Date", and "Subject" in
  22that order.
  23
  24Typical usage is something like:
  25
  26git format-patch --signoff --stdout --attach origin | git imap-send
  27
  28
  29OPTIONS
  30-------
  31
  32-v::
  33--verbose::
  34        Be verbose.
  35
  36-q::
  37--quiet::
  38        Be quiet.
  39
  40--curl::
  41        Use libcurl to communicate with the IMAP server, unless tunneling
  42        into it.  Ignored if Git was built without the USE_CURL_FOR_IMAP_SEND
  43        option set.
  44
  45--no-curl::
  46        Talk to the IMAP server using git's own IMAP routines instead of
  47        using libcurl.
  48
  49
  50CONFIGURATION
  51-------------
  52
  53To use the tool, imap.folder and either imap.tunnel or imap.host must be set
  54to appropriate values.
  55
  56Variables
  57~~~~~~~~~
  58
  59imap.folder::
  60        The folder to drop the mails into, which is typically the Drafts
  61        folder. For example: "INBOX.Drafts", "INBOX/Drafts" or
  62        "[Gmail]/Drafts". Required.
  63
  64imap.tunnel::
  65        Command used to setup a tunnel to the IMAP server through which
  66        commands will be piped instead of using a direct network connection
  67        to the server. Required when imap.host is not set.
  68
  69imap.host::
  70        A URL identifying the server. Use a `imap://` prefix for non-secure
  71        connections and a `imaps://` prefix for secure connections.
  72        Ignored when imap.tunnel is set, but required otherwise.
  73
  74imap.user::
  75        The username to use when logging in to the server.
  76
  77imap.pass::
  78        The password to use when logging in to the server.
  79
  80imap.port::
  81        An integer port number to connect to on the server.
  82        Defaults to 143 for imap:// hosts and 993 for imaps:// hosts.
  83        Ignored when imap.tunnel is set.
  84
  85imap.sslverify::
  86        A boolean to enable/disable verification of the server certificate
  87        used by the SSL/TLS connection. Default is `true`. Ignored when
  88        imap.tunnel is set.
  89
  90imap.preformattedHTML::
  91        A boolean to enable/disable the use of html encoding when sending
  92        a patch.  An html encoded patch will be bracketed with <pre>
  93        and have a content type of text/html.  Ironically, enabling this
  94        option causes Thunderbird to send the patch as a plain/text,
  95        format=fixed email.  Default is `false`.
  96
  97imap.authMethod::
  98        Specify authenticate method for authentication with IMAP server.
  99        If Git was built with the NO_CURL option, or if your curl version is older
 100        than 7.34.0, or if you're running git-imap-send with the `--no-curl`
 101        option, the only supported method is 'CRAM-MD5'. If this is not set
 102        then 'git imap-send' uses the basic IMAP plaintext LOGIN command.
 103
 104Examples
 105~~~~~~~~
 106
 107Using tunnel mode:
 108
 109..........................
 110[imap]
 111    folder = "INBOX.Drafts"
 112    tunnel = "ssh -q -C user@example.com /usr/bin/imapd ./Maildir 2> /dev/null"
 113..........................
 114
 115Using direct mode:
 116
 117.........................
 118[imap]
 119    folder = "INBOX.Drafts"
 120    host = imap://imap.example.com
 121    user = bob
 122    pass = p4ssw0rd
 123.........................
 124
 125Using direct mode with SSL:
 126
 127.........................
 128[imap]
 129    folder = "INBOX.Drafts"
 130    host = imaps://imap.example.com
 131    user = bob
 132    pass = p4ssw0rd
 133    port = 123
 134    sslverify = false
 135.........................
 136
 137
 138EXAMPLE
 139-------
 140To submit patches using GMail's IMAP interface, first, edit your ~/.gitconfig
 141to specify your account settings:
 142
 143---------
 144[imap]
 145        folder = "[Gmail]/Drafts"
 146        host = imaps://imap.gmail.com
 147        user = user@gmail.com
 148        port = 993
 149        sslverify = false
 150---------
 151
 152You might need to instead use: folder = "[Google Mail]/Drafts" if you get an error
 153that the "Folder doesn't exist".
 154
 155Once the commits are ready to be sent, run the following command:
 156
 157  $ git format-patch --cover-letter -M --stdout origin/master | git imap-send
 158
 159Just make sure to disable line wrapping in the email client (GMail's web
 160interface will wrap lines no matter what, so you need to use a real
 161IMAP client).
 162
 163CAUTION
 164-------
 165It is still your responsibility to make sure that the email message
 166sent by your email program meets the standards of your project.
 167Many projects do not like patches to be attached.  Some mail
 168agents will transform patches (e.g. wrap lines, send them as
 169format=flowed) in ways that make them fail.  You will get angry
 170flames ridiculing you if you don't check this.
 171
 172Thunderbird in particular is known to be problematic.  Thunderbird
 173users may wish to visit this web page for more information:
 174  http://kb.mozillazine.org/Plain_text_e-mail_-_Thunderbird#Completely_plain_email
 175
 176SEE ALSO
 177--------
 178linkgit:git-format-patch[1], linkgit:git-send-email[1], mbox(5)
 179
 180GIT
 181---
 182Part of the linkgit:git[1] suite