blob: c7c0d21429bb745d1abcfc775308e8ccac8f499a [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 Hamanofce7c7e2008-07-02 03:06:3812'git imap-send'
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
29CONFIGURATION
30-------------
31
Junio C Hamano5cf43ca2008-08-20 09:14:1432To use the tool, imap.folder and either imap.tunnel or imap.host must be set
33to appropriate values.
34
35Variables
36~~~~~~~~~
37
38imap.folder::
39The folder to drop the mails into, which is typically the Drafts
40folder. For example: "INBOX.Drafts", "INBOX/Drafts" or
Junio C Hamano53fe0312014-09-09 21:16:1741"[Gmail]/Drafts". Required.
Junio C Hamano5cf43ca2008-08-20 09:14:1442
43imap.tunnel::
44Command used to setup a tunnel to the IMAP server through which
45commands will be piped instead of using a direct network connection
Junio C Hamano53fe0312014-09-09 21:16:1746to the server. Required when imap.host is not set.
Junio C Hamano5cf43ca2008-08-20 09:14:1447
48imap.host::
49A URL identifying the server. Use a `imap://` prefix for non-secure
50connections and a `imaps://` prefix for secure connections.
Junio C Hamano53fe0312014-09-09 21:16:1751Ignored when imap.tunnel is set, but required otherwise.
Junio C Hamano5cf43ca2008-08-20 09:14:1452
53imap.user::
54The username to use when logging in to the server.
55
Junio C Hamano4cfa5362009-04-18 23:01:0156imap.pass::
Junio C Hamano5cf43ca2008-08-20 09:14:1457The password to use when logging in to the server.
58
59imap.port::
60An integer port number to connect to on the server.
61Defaults to 143 for imap:// hosts and 993 for imaps:// hosts.
62Ignored when imap.tunnel is set.
63
64imap.sslverify::
65A boolean to enable/disable verification of the server certificate
66used by the SSL/TLS connection. Default is `true`. Ignored when
67imap.tunnel is set.
68
Junio C Hamano0a235222009-03-06 08:21:0969imap.preformattedHTML::
70A boolean to enable/disable the use of html encoding when sending
71a patch. An html encoded patch will be bracketed with <pre>
72and have a content type of text/html. Ironically, enabling this
73option causes Thunderbird to send the patch as a plain/text,
74format=fixed email. Default is `false`.
75
Junio C Hamano4aa0bcc2010-03-03 05:13:1276imap.authMethod::
77Specify authenticate method for authentication with IMAP server.
Junio C Hamano53fe0312014-09-09 21:16:1778Current supported method is 'CRAM-MD5' only. If this is not set
79then 'git imap-send' uses the basic IMAP plaintext LOGIN command.
Junio C Hamano4aa0bcc2010-03-03 05:13:1280
Junio C Hamano5cf43ca2008-08-20 09:14:1481Examples
82~~~~~~~~
83
84Using tunnel mode:
Junio C Hamano883d8432006-04-06 23:15:3985
Junio C Hamano1bb569e2006-05-05 23:14:2586..........................
Junio C Hamano883d8432006-04-06 23:15:3987[imap]
Junio C Hamano5cf43ca2008-08-20 09:14:1488 folder = "INBOX.Drafts"
89 tunnel = "ssh -q -C user@example.com /usr/bin/imapd ./Maildir 2> /dev/null"
90..........................
Junio C Hamano883d8432006-04-06 23:15:3991
Junio C Hamano5cf43ca2008-08-20 09:14:1492Using direct mode:
Junio C Hamano883d8432006-04-06 23:15:3993
Junio C Hamano5cf43ca2008-08-20 09:14:1494.........................
Junio C Hamano883d8432006-04-06 23:15:3995[imap]
Junio C Hamano5cf43ca2008-08-20 09:14:1496 folder = "INBOX.Drafts"
97 host = imap://imap.example.com
98 user = bob
99 pass = p4ssw0rd
Junio C Hamano4c43d652014-10-20 21:14:29100.........................
Junio C Hamano5cf43ca2008-08-20 09:14:14101
102Using direct mode with SSL:
103
104.........................
105[imap]
106 folder = "INBOX.Drafts"
107 host = imaps://imap.example.com
108 user = bob
109 pass = p4ssw0rd
110 port = 123
111 sslverify = false
Junio C Hamano4c43d652014-10-20 21:14:29112.........................
Junio C Hamano883d8432006-04-06 23:15:39113
114
Junio C Hamanob77f8192011-05-05 01:30:38115EXAMPLE
116-------
117To submit patches using GMail's IMAP interface, first, edit your ~/.gitconfig
118to specify your account settings:
119
120---------
121[imap]
122folder = "[Gmail]/Drafts"
123host = imaps://imap.gmail.com
124user = user@gmail.com
125port = 993
126sslverify = false
127---------
128
129You might need to instead use: folder = "[Google Mail]/Drafts" if you get an error
130that the "Folder doesn't exist".
131
132Once the commits are ready to be sent, run the following command:
133
134 $ git format-patch --cover-letter -M --stdout origin/master | git imap-send
135
136Just make sure to disable line wrapping in the email client (GMail's web
137interface will wrap lines no matter what, so you need to use a real
138IMAP client).
139
Junio C Hamanoec3b9a72009-02-13 08:45:52140CAUTION
141-------
142It is still your responsibility to make sure that the email message
143sent by your email program meets the standards of your project.
144Many projects do not like patches to be attached. Some mail
145agents will transform patches (e.g. wrap lines, send them as
146format=flowed) in ways that make them fail. You will get angry
147flames ridiculing you if you don't check this.
148
149Thunderbird in particular is known to be problematic. Thunderbird
150users may wish to visit this web page for more information:
151 http://kb.mozillazine.org/Plain_text_e-mail_-_Thunderbird#Completely_plain_email
152
Junio C Hamanob77f8192011-05-05 01:30:38153SEE ALSO
154--------
155linkgit:git-format-patch[1], linkgit:git-send-email[1], mbox(5)
156
Junio C Hamano883d8432006-04-06 23:15:39157GIT
158---
Junio C Hamanof7c042d2008-06-06 22:50:53159Part of the linkgit:git[1] suite