1GIT-IMAP-SEND(1) Git Manual GIT-IMAP-SEND(1)
2
3
4
6 git-imap-send - Send a collection of patches from stdin to an IMAP
7 folder
8
10 git imap-send [-v] [-q] [--[no-]curl]
11
13 This command uploads a mailbox generated with git format-patch into an
14 IMAP drafts folder. This allows patches to be sent as other email is
15 when using mail clients that cannot read mailbox files directly. The
16 command also works with any general mailbox in which emails have the
17 fields "From", "Date", and "Subject" in that order.
18
19 Typical usage is something like:
20
21 git format-patch --signoff --stdout --attach origin | git imap-send
22
24 -v, --verbose
25 Be verbose.
26
27 -q, --quiet
28 Be quiet.
29
30 --curl
31 Use libcurl to communicate with the IMAP server, unless tunneling
32 into it. Ignored if Git was built without the
33 USE_CURL_FOR_IMAP_SEND option set.
34
35 --no-curl
36 Talk to the IMAP server using git’s own IMAP routines instead of
37 using libcurl. Ignored if Git was built with the NO_OPENSSL option
38 set.
39
41 To use the tool, imap.folder and either imap.tunnel or imap.host must
42 be set to appropriate values.
43
44 Everything above this line in this section isn’t included from the git-
45 config(1) documentation. The content that follows is the same as what’s
46 found there:
47
48 imap.folder
49 The folder to drop the mails into, which is typically the Drafts
50 folder. For example: "INBOX.Drafts", "INBOX/Drafts" or
51 "[Gmail]/Drafts". Required.
52
53 imap.tunnel
54 Command used to set up a tunnel to the IMAP server through which
55 commands will be piped instead of using a direct network connection
56 to the server. Required when imap.host is not set.
57
58 imap.host
59 A URL identifying the server. Use an imap:// prefix for non-secure
60 connections and an imaps:// prefix for secure connections. Ignored
61 when imap.tunnel is set, but required otherwise.
62
63 imap.user
64 The username to use when logging in to the server.
65
66 imap.pass
67 The password to use when logging in to the server.
68
69 imap.port
70 An integer port number to connect to on the server. Defaults to 143
71 for imap:// hosts and 993 for imaps:// hosts. Ignored when
72 imap.tunnel is set.
73
74 imap.sslverify
75 A boolean to enable/disable verification of the server certificate
76 used by the SSL/TLS connection. Default is true. Ignored when
77 imap.tunnel is set.
78
79 imap.preformattedHTML
80 A boolean to enable/disable the use of html encoding when sending a
81 patch. An html encoded patch will be bracketed with <pre> and have
82 a content type of text/html. Ironically, enabling this option
83 causes Thunderbird to send the patch as a plain/text, format=fixed
84 email. Default is false.
85
86 imap.authMethod
87 Specify the authentication method for authenticating with the IMAP
88 server. If Git was built with the NO_CURL option, or if your curl
89 version is older than 7.34.0, or if you’re running git-imap-send
90 with the --no-curl option, the only supported method is CRAM-MD5.
91 If this is not set then git imap-send uses the basic IMAP plaintext
92 LOGIN command.
93
95 Using tunnel mode:
96
97 [imap]
98 folder = "INBOX.Drafts"
99 tunnel = "ssh -q -C user@example.com /usr/bin/imapd ./Maildir 2> /dev/null"
100
101 Using direct mode:
102
103 [imap]
104 folder = "INBOX.Drafts"
105 host = imap://imap.example.com
106 user = bob
107 pass = p4ssw0rd
108
109 Using direct mode with SSL:
110
111 [imap]
112 folder = "INBOX.Drafts"
113 host = imaps://imap.example.com
114 user = bob
115 pass = p4ssw0rd
116 port = 123
117 ; sslVerify = false
118
119
120 Note
121 You may want to use sslVerify=false while troubleshooting, if you
122 suspect that the reason you are having trouble connecting is
123 because the certificate you use at the private server example.com
124 you are trying to set up (or have set up) may not be verified
125 correctly.
126
127 Using Gmail’s IMAP interface:
128
129 [imap]
130 folder = "[Gmail]/Drafts"
131 host = imaps://imap.gmail.com
132 user = user@gmail.com
133 port = 993
134
135
136 Note
137 You might need to instead use: folder = "[Google Mail]/Drafts" if
138 you get an error that the "Folder doesn’t exist".
139
140 Note
141 If your Gmail account is set to another language than English, the
142 name of the "Drafts" folder will be localized.
143
144 Once the commits are ready to be sent, run the following command:
145
146 $ git format-patch --cover-letter -M --stdout origin/master | git imap-send
147
148 Just make sure to disable line wrapping in the email client (Gmail’s
149 web interface will wrap lines no matter what, so you need to use a real
150 IMAP client).
151
153 It is still your responsibility to make sure that the email message
154 sent by your email program meets the standards of your project. Many
155 projects do not like patches to be attached. Some mail agents will
156 transform patches (e.g. wrap lines, send them as format=flowed) in ways
157 that make them fail. You will get angry flames ridiculing you if you
158 don’t check this.
159
160 Thunderbird in particular is known to be problematic. Thunderbird users
161 may wish to visit this web page for more information:
162 http://kb.mozillazine.org/Plain_text_e-mail_-_Thunderbird#Completely_plain_email
163
165 git-format-patch(1), git-send-email(1), mbox(5)
166
168 Part of the git(1) suite
169
170
171
172Git 2.43.0 11/20/2023 GIT-IMAP-SEND(1)