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