]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/git-imap-send.txt
Merge branch 'jk/use-compat-util-in-test-tool'
[thirdparty/git.git] / Documentation / git-imap-send.txt
CommitLineData
454a35b8
MM
1git-imap-send(1)
2================
3
4NAME
5----
c82b0748 6git-imap-send - Send a collection of patches from stdin to an IMAP folder
454a35b8
MM
7
8
9SYNOPSIS
10--------
7791a1d9 11[verse]
1e16b255 12'git imap-send' [-v] [-q] [--[no-]curl]
454a35b8
MM
13
14
15DESCRIPTION
16-----------
0b444cdb 17This command uploads a mailbox generated with 'git format-patch'
c82b0748
RS
18into an IMAP drafts folder. This allows patches to be sent as
19other email is when using mail clients that cannot read mailbox
4916c8f9
RR
20files directly. The command also works with any general mailbox
21in which emails have the fields "From", "Date", and "Subject" in
22that order.
454a35b8
MM
23
24Typical usage is something like:
25
b1889c36 26git format-patch --signoff --stdout --attach origin | git imap-send
454a35b8
MM
27
28
f1a35295
BR
29OPTIONS
30-------
31
32-v::
33--verbose::
34 Be verbose.
35
36-q::
37--quiet::
38 Be quiet.
39
1e16b255
BR
40--curl::
41 Use libcurl to communicate with the IMAP server, unless tunneling
42 into it. Ignored if Git was built without the USE_CURL_FOR_IMAP_SEND
43 option set.
44
45--no-curl::
46 Talk to the IMAP server using git's own IMAP routines instead of
dcd01ea1
KM
47 using libcurl. Ignored if Git was built with the NO_OPENSSL option
48 set.
1e16b255 49
f1a35295 50
454a35b8
MM
51CONFIGURATION
52-------------
53
c82b0748
RS
54To use the tool, imap.folder and either imap.tunnel or imap.host must be set
55to appropriate values.
56
57Variables
58~~~~~~~~~
59
60imap.folder::
61 The folder to drop the mails into, which is typically the Drafts
62 folder. For example: "INBOX.Drafts", "INBOX/Drafts" or
a127b3f2 63 "[Gmail]/Drafts". Required.
c82b0748
RS
64
65imap.tunnel::
66 Command used to setup a tunnel to the IMAP server through which
67 commands will be piped instead of using a direct network connection
a127b3f2 68 to the server. Required when imap.host is not set.
c82b0748
RS
69
70imap.host::
928f0ab4
VS
71 A URL identifying the server. Use an `imap://` prefix for non-secure
72 connections and an `imaps://` prefix for secure connections.
a127b3f2 73 Ignored when imap.tunnel is set, but required otherwise.
c82b0748
RS
74
75imap.user::
76 The username to use when logging in to the server.
77
43be7a78 78imap.pass::
c82b0748
RS
79 The password to use when logging in to the server.
80
81imap.port::
82 An integer port number to connect to on the server.
83 Defaults to 143 for imap:// hosts and 993 for imaps:// hosts.
84 Ignored when imap.tunnel is set.
85
86imap.sslverify::
87 A boolean to enable/disable verification of the server certificate
88 used by the SSL/TLS connection. Default is `true`. Ignored when
89 imap.tunnel is set.
90
c64d84f1
JW
91imap.preformattedHTML::
92 A boolean to enable/disable the use of html encoding when sending
93 a patch. An html encoded patch will be bracketed with <pre>
94 and have a content type of text/html. Ironically, enabling this
95 option causes Thunderbird to send the patch as a plain/text,
96 format=fixed email. Default is `false`.
97
ae9c606e
HM
98imap.authMethod::
99 Specify authenticate method for authentication with IMAP server.
1e16b255
BR
100 If Git was built with the NO_CURL option, or if your curl version is older
101 than 7.34.0, or if you're running git-imap-send with the `--no-curl`
102 option, the only supported method is 'CRAM-MD5'. If this is not set
f07243fe 103 then 'git imap-send' uses the basic IMAP plaintext LOGIN command.
ae9c606e 104
c82b0748
RS
105Examples
106~~~~~~~~
107
108Using tunnel mode:
454a35b8 109
2b5f3ed3 110..........................
454a35b8 111[imap]
c82b0748
RS
112 folder = "INBOX.Drafts"
113 tunnel = "ssh -q -C user@example.com /usr/bin/imapd ./Maildir 2> /dev/null"
114..........................
454a35b8 115
c82b0748
RS
116Using direct mode:
117
118.........................
454a35b8 119[imap]
c82b0748
RS
120 folder = "INBOX.Drafts"
121 host = imap://imap.example.com
122 user = bob
123 pass = p4ssw0rd
f8a48aff 124.........................
c82b0748
RS
125
126Using direct mode with SSL:
454a35b8 127
c82b0748 128.........................
454a35b8 129[imap]
c82b0748
RS
130 folder = "INBOX.Drafts"
131 host = imaps://imap.example.com
132 user = bob
133 pass = p4ssw0rd
134 port = 123
684ec6c6 135 sslverify = false
f8a48aff 136.........................
454a35b8
MM
137
138
76a8788c
NTND
139EXAMPLES
140--------
36c10e6d
JN
141To submit patches using GMail's IMAP interface, first, edit your ~/.gitconfig
142to specify your account settings:
143
144---------
145[imap]
146 folder = "[Gmail]/Drafts"
147 host = imaps://imap.gmail.com
148 user = user@gmail.com
149 port = 993
150 sslverify = 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
1a526d48
JW
164CAUTION
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
36c10e6d
JN
177SEE ALSO
178--------
179linkgit:git-format-patch[1], linkgit:git-send-email[1], mbox(5)
180
454a35b8
MM
181GIT
182---
9e1f0a85 183Part of the linkgit:git[1] suite