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