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