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