blob: 875d2831a541170402849e2c8598fabafa42a0df [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
41"[Gmail]/Drafts". Required to use imap-send.
42
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
46to the server. Required when imap.host is not set to use imap-send.
47
48imap.host::
49A URL identifying the server. Use a `imap://` prefix for non-secure
50connections and a `imaps://` prefix for secure connections.
51Ignored when imap.tunnel is set, but required to use imap-send
52otherwise.
53
54imap.user::
55The username to use when logging in to the server.
56
Junio C Hamano4cfa5362009-04-18 23:01:0157imap.pass::
Junio C Hamano5cf43ca2008-08-20 09:14:1458The password to use when logging in to the server.
59
60imap.port::
61An integer port number to connect to on the server.
62Defaults to 143 for imap:// hosts and 993 for imaps:// hosts.
63Ignored when imap.tunnel is set.
64
65imap.sslverify::
66A boolean to enable/disable verification of the server certificate
67used by the SSL/TLS connection. Default is `true`. Ignored when
68imap.tunnel is set.
69
Junio C Hamano0a235222009-03-06 08:21:0970imap.preformattedHTML::
71A boolean to enable/disable the use of html encoding when sending
72a patch. An html encoded patch will be bracketed with <pre>
73and have a content type of text/html. Ironically, enabling this
74option causes Thunderbird to send the patch as a plain/text,
75format=fixed email. Default is `false`.
76
Junio C Hamano4aa0bcc2010-03-03 05:13:1277imap.authMethod::
78Specify authenticate method for authentication with IMAP server.
79Current supported method is 'CRAM-MD5' only.
80
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
100..........................
101
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 Hamano1bb569e2006-05-05 23:14:25112..........................
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