blob: 5d1e4c80cd5d479a43c39ffb12b66a7302e754e7 [file] [log] [blame]
Junio C Hamano883d8432006-04-06 23:15:391git-imap-send(1)
2================
3
4NAME
5----
Junio C Hamano5cf43ca2008-08-20 09:14:146git-imap-send - Send a collection of patches from stdin to an IMAP folder
Junio C Hamano883d8432006-04-06 23:15:397
8
9SYNOPSIS
10--------
Junio C Hamano15567bc2011-07-23 00:51:5911[verse]
Junio C Hamanoc9394b22015-01-07 22:45:4812'git imap-send' [-v] [-q] [--[no-]curl]
Junio C Hamano883d8432006-04-06 23:15:3913
14
15DESCRIPTION
16-----------
Junio C Hamano1aa40d22010-01-21 17:46:4317This command uploads a mailbox generated with 'git format-patch'
Junio C Hamano5cf43ca2008-08-20 09:14:1418into an IMAP drafts folder. This allows patches to be sent as
19other email is when using mail clients that cannot read mailbox
Junio C Hamanoef8fbf92010-04-04 19:12:0220files directly. The command also works with any general mailbox
21in which emails have the fields "From", "Date", and "Subject" in
22that order.
Junio C Hamano883d8432006-04-06 23:15:3923
24Typical usage is something like:
25
Junio C Hamanofce7c7e2008-07-02 03:06:3826git format-patch --signoff --stdout --attach origin | git imap-send
Junio C Hamano883d8432006-04-06 23:15:3927
28
Junio C Hamanoc9394b22015-01-07 22:45:4829OPTIONS
30-------
31
32-v::
33--verbose::
34Be verbose.
35
36-q::
37--quiet::
38Be quiet.
39
40--curl::
41Use libcurl to communicate with the IMAP server, unless tunneling
42into it. Ignored if Git was built without the USE_CURL_FOR_IMAP_SEND
43option set.
44
45--no-curl::
46Talk to the IMAP server using git's own IMAP routines instead of
Junio C Hamano07622622015-03-20 21:47:2647using libcurl. Ignored if Git was built with the NO_OPENSSL option
48set.
Junio C Hamanoc9394b22015-01-07 22:45:4849
50
Junio C Hamano883d8432006-04-06 23:15:3951CONFIGURATION
52-------------
53
Junio C Hamano5cf43ca2008-08-20 09:14:1454To use the tool, imap.folder and either imap.tunnel or imap.host must be set
55to appropriate values.
56
57Variables
58~~~~~~~~~
59
60imap.folder::
61The folder to drop the mails into, which is typically the Drafts
62folder. For example: "INBOX.Drafts", "INBOX/Drafts" or
Junio C Hamano53fe0312014-09-09 21:16:1763"[Gmail]/Drafts". Required.
Junio C Hamano5cf43ca2008-08-20 09:14:1464
65imap.tunnel::
66Command used to setup a tunnel to the IMAP server through which
67commands will be piped instead of using a direct network connection
Junio C Hamano53fe0312014-09-09 21:16:1768to the server. Required when imap.host is not set.
Junio C Hamano5cf43ca2008-08-20 09:14:1469
70imap.host::
71A URL identifying the server. Use a `imap://` prefix for non-secure
72connections and a `imaps://` prefix for secure connections.
Junio C Hamano53fe0312014-09-09 21:16:1773Ignored when imap.tunnel is set, but required otherwise.
Junio C Hamano5cf43ca2008-08-20 09:14:1474
75imap.user::
76The username to use when logging in to the server.
77
Junio C Hamano4cfa5362009-04-18 23:01:0178imap.pass::
Junio C Hamano5cf43ca2008-08-20 09:14:1479The password to use when logging in to the server.
80
81imap.port::
82An integer port number to connect to on the server.
83Defaults to 143 for imap:// hosts and 993 for imaps:// hosts.
84Ignored when imap.tunnel is set.
85
86imap.sslverify::
87A boolean to enable/disable verification of the server certificate
88used by the SSL/TLS connection. Default is `true`. Ignored when
89imap.tunnel is set.
90
Junio C Hamano0a235222009-03-06 08:21:0991imap.preformattedHTML::
92A boolean to enable/disable the use of html encoding when sending
93a patch. An html encoded patch will be bracketed with <pre>
94and have a content type of text/html. Ironically, enabling this
95option causes Thunderbird to send the patch as a plain/text,
96format=fixed email. Default is `false`.
97
Junio C Hamano4aa0bcc2010-03-03 05:13:1298imap.authMethod::
99Specify authenticate method for authentication with IMAP server.
Junio C Hamanoc9394b22015-01-07 22:45:48100If Git was built with the NO_CURL option, or if your curl version is older
101than 7.34.0, or if you're running git-imap-send with the `--no-curl`
102option, the only supported method is 'CRAM-MD5'. If this is not set
Junio C Hamano53fe0312014-09-09 21:16:17103then 'git imap-send' uses the basic IMAP plaintext LOGIN command.
Junio C Hamano4aa0bcc2010-03-03 05:13:12104
Junio C Hamano5cf43ca2008-08-20 09:14:14105Examples
106~~~~~~~~
107
108Using tunnel mode:
Junio C Hamano883d8432006-04-06 23:15:39109
Junio C Hamano1bb569e2006-05-05 23:14:25110..........................
Junio C Hamano883d8432006-04-06 23:15:39111[imap]
Junio C Hamano5cf43ca2008-08-20 09:14:14112 folder = "INBOX.Drafts"
113 tunnel = "ssh -q -C user@example.com /usr/bin/imapd ./Maildir 2> /dev/null"
114..........................
Junio C Hamano883d8432006-04-06 23:15:39115
Junio C Hamano5cf43ca2008-08-20 09:14:14116Using direct mode:
Junio C Hamano883d8432006-04-06 23:15:39117
Junio C Hamano5cf43ca2008-08-20 09:14:14118.........................
Junio C Hamano883d8432006-04-06 23:15:39119[imap]
Junio C Hamano5cf43ca2008-08-20 09:14:14120 folder = "INBOX.Drafts"
121 host = imap://imap.example.com
122 user = bob
123 pass = p4ssw0rd
Junio C Hamano4c43d652014-10-20 21:14:29124.........................
Junio C Hamano5cf43ca2008-08-20 09:14:14125
126Using direct mode with SSL:
127
128.........................
129[imap]
130 folder = "INBOX.Drafts"
131 host = imaps://imap.example.com
132 user = bob
133 pass = p4ssw0rd
134 port = 123
135 sslverify = false
Junio C Hamano4c43d652014-10-20 21:14:29136.........................
Junio C Hamano883d8432006-04-06 23:15:39137
138
Junio C Hamanob77f8192011-05-05 01:30:38139EXAMPLE
140-------
141To submit patches using GMail's IMAP interface, first, edit your ~/.gitconfig
142to specify your account settings:
143
144---------
145[imap]
146folder = "[Gmail]/Drafts"
147host = imaps://imap.gmail.com
148user = user@gmail.com
149port = 993
150sslverify = false
151---------
152
153You might need to instead use: folder = "[Google Mail]/Drafts" if you get an error
154that the "Folder doesn't exist".
155
156Once the commits are ready to be sent, run the following command:
157
158 $ git format-patch --cover-letter -M --stdout origin/master | git imap-send
159
160Just make sure to disable line wrapping in the email client (GMail's web
161interface will wrap lines no matter what, so you need to use a real
162IMAP client).
163
Junio C Hamanoec3b9a72009-02-13 08:45:52164CAUTION
165-------
166It is still your responsibility to make sure that the email message
167sent by your email program meets the standards of your project.
168Many projects do not like patches to be attached. Some mail
169agents will transform patches (e.g. wrap lines, send them as
170format=flowed) in ways that make them fail. You will get angry
171flames ridiculing you if you don't check this.
172
173Thunderbird in particular is known to be problematic. Thunderbird
174users may wish to visit this web page for more information:
175 http://kb.mozillazine.org/Plain_text_e-mail_-_Thunderbird#Completely_plain_email
176
Junio C Hamanob77f8192011-05-05 01:30:38177SEE ALSO
178--------
179linkgit:git-format-patch[1], linkgit:git-send-email[1], mbox(5)
180
Junio C Hamano883d8432006-04-06 23:15:39181GIT
182---
Junio C Hamanof7c042d2008-06-06 22:50:53183Part of the linkgit:git[1] suite