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 imap.folder
45 The folder to drop the mails into, which is typically the Drafts
46 folder. For example: "INBOX.Drafts", "INBOX/Drafts" or
47 "[Gmail]/Drafts". Required.
48
49 imap.tunnel
50 Command used to setup a tunnel to the IMAP server through which
51 commands will be piped instead of using a direct network connection
52 to the server. Required when imap.host is not set.
53
54 imap.host
55 A URL identifying the server. Use an imap:// prefix for non-secure
56 connections and an imaps:// prefix for secure connections. Ignored
57 when imap.tunnel is set, but required otherwise.
58
59 imap.user
60 The username to use when logging in to the server.
61
62 imap.pass
63 The password to use when logging in to the server.
64
65 imap.port
66 An integer port number to connect to on the server. Defaults to 143
67 for imap:// hosts and 993 for imaps:// hosts. Ignored when
68 imap.tunnel is set.
69
70 imap.sslverify
71 A boolean to enable/disable verification of the server certificate
72 used by the SSL/TLS connection. Default is true. Ignored when
73 imap.tunnel is set.
74
75 imap.preformattedHTML
76 A boolean to enable/disable the use of html encoding when sending a
77 patch. An html encoded patch will be bracketed with <pre> and have
78 a content type of text/html. Ironically, enabling this option
79 causes Thunderbird to send the patch as a plain/text, format=fixed
80 email. Default is false.
81
82 imap.authMethod
83 Specify authenticate method for authentication with IMAP server. If
84 Git was built with the NO_CURL option, or if your curl version is
85 older than 7.34.0, or if you’re running git-imap-send with the
86 --no-curl option, the only supported method is CRAM-MD5. If this is
87 not set then git imap-send uses the basic IMAP plaintext LOGIN
88 command.
89
91 Using tunnel mode:
92
93 [imap]
94 folder = "INBOX.Drafts"
95 tunnel = "ssh -q -C user@example.com /usr/bin/imapd ./Maildir 2> /dev/null"
96
97 Using direct mode:
98
99 [imap]
100 folder = "INBOX.Drafts"
101 host = imap://imap.example.com
102 user = bob
103 pass = p4ssw0rd
104
105 Using direct mode with SSL:
106
107 [imap]
108 folder = "INBOX.Drafts"
109 host = imaps://imap.example.com
110 user = bob
111 pass = p4ssw0rd
112 port = 123
113 ; sslVerify = false
114
115
116 Note
117 You may want to use sslVerify=false while troubleshooting, if you
118 suspect that the reason you are having trouble connecting is
119 because the certificate you use at the private server example.com
120 you are trying to set up (or have set up) may not be verified
121 correctly.
122
123 Using Gmail’s IMAP interface:
124
125 [imap]
126 folder = "[Gmail]/Drafts"
127 host = imaps://imap.gmail.com
128 user = user@gmail.com
129 port = 993
130
131
132 Note
133 You might need to instead use: folder = "[Google Mail]/Drafts" if
134 you get an error that the "Folder doesn’t exist".
135
136 Note
137 If your Gmail account is set to another language than English, the
138 name of the "Drafts" folder will be localized.
139
140 Once the commits are ready to be sent, run the following command:
141
142 $ git format-patch --cover-letter -M --stdout origin/master | git imap-send
143
144 Just make sure to disable line wrapping in the email client (Gmail’s
145 web interface will wrap lines no matter what, so you need to use a real
146 IMAP client).
147
149 It is still your responsibility to make sure that the email message
150 sent by your email program meets the standards of your project. Many
151 projects do not like patches to be attached. Some mail agents will
152 transform patches (e.g. wrap lines, send them as format=flowed) in ways
153 that make them fail. You will get angry flames ridiculing you if you
154 don’t check this.
155
156 Thunderbird in particular is known to be problematic. Thunderbird users
157 may wish to visit this web page for more information:
158 http://kb.mozillazine.org/Plain_text_e-mail_-_Thunderbird#Completely_plain_email
159
161 git-format-patch(1), git-send-email(1), mbox(5)
162
164 Part of the git(1) suite
165
166
167
168Git 2.30.2 2021-03-08 GIT-IMAP-SEND(1)