blob: 41cd8cb42472a71d93f4f2f6379445f453b7be06 [file] [log] [blame]
Junio C Hamano1a4e8412005-12-27 08:17:231git-send-email(1)
2=================
3
4NAME
5----
6git-send-email - Send a collection of patches as emails
7
8
9SYNOPSIS
10--------
Junio C Hamano15567bc2011-07-23 00:51:5911[verse]
Junio C Hamanof24d6b52021-11-29 23:56:2212'git send-email' [<options>] <file|directory>...
13'git send-email' [<options>] <format-patch options>
Junio C Hamanoabb8a052015-12-04 22:43:1114'git send-email' --dump-aliases
Junio C Hamano1a4e8412005-12-27 08:17:2315
16
Junio C Hamano1a4e8412005-12-27 08:17:2317DESCRIPTION
18-----------
19Takes the patches given on the command line and emails them out.
Junio C Hamanob95b43d2009-06-12 08:57:2820Patches can be specified as files, directories (which will send all
21files in the directory), or directly as a revision list. In the
22last case, any format accepted by linkgit:git-format-patch[1] can
Junio C Hamanof24d6b52021-11-29 23:56:2223be passed to git send-email, as well as options understood by
24linkgit:git-format-patch[1].
Junio C Hamano1a4e8412005-12-27 08:17:2325
Junio C Hamanoe1aeb5e2014-06-06 19:16:2926The header of the email is configurable via command-line options. If not
Junio C Hamano1a4e8412005-12-27 08:17:2327specified on the command line, the user will be prompted with a ReadLine
28enabled interface to provide the necessary information.
29
Junio C Hamanoa6455f62009-02-20 08:33:0830There are two formats accepted for patch files:
31
321. mbox format files
33+
34This is what linkgit:git-format-patch[1] generates. Most headers and MIME
35formatting are ignored.
36
372. The original format used by Greg Kroah-Hartman's 'send_lots_of_email.pl'
Junio C Hamano2567b322019-02-05 23:33:5638 script
Junio C Hamanoa6455f62009-02-20 08:33:0839+
40This format expects the first line of the file to contain the "Cc:" value
41and the "Subject:" of the message as the second line.
42
Junio C Hamanoa476efa2008-10-10 15:31:4243
Junio C Hamano1a4e8412005-12-27 08:17:2344OPTIONS
45-------
Junio C Hamanoa476efa2008-10-10 15:31:4246
47Composing
48~~~~~~~~~
Junio C Hamano1a4e8412005-12-27 08:17:2349
Junio C Hamano3d141512009-06-01 01:22:4050--annotate::
Junio C Hamanoea3b7522013-04-18 19:37:5351Review and edit each patch you're about to send. Default is the value
Junio C Hamano042f2142016-06-27 18:05:0552of `sendemail.annotate`. See the CONFIGURATION section for
53`sendemail.multiEdit`.
Junio C Hamano3d141512009-06-01 01:22:4054
Junio C Hamanod7ed4042015-08-03 19:43:0055--bcc=<address>,...::
Junio C Hamanoa476efa2008-10-10 15:31:4256Specify a "Bcc:" value for each email. Default is the value of
Junio C Hamano042f2142016-06-27 18:05:0557`sendemail.bcc`.
Junio C Hamanoa3fd83c2007-03-02 10:34:3658+
Junio C Hamanod7ed4042015-08-03 19:43:0059This option may be specified multiple times.
Junio C Hamano97f518c2006-06-22 19:49:3560
Junio C Hamanod7ed4042015-08-03 19:43:0061--cc=<address>,...::
Junio C Hamanoc9154122006-02-15 02:22:0662Specify a starting "Cc:" value for each email.
Junio C Hamano042f2142016-06-27 18:05:0563Default is the value of `sendemail.cc`.
Junio C Hamanoa3fd83c2007-03-02 10:34:3664+
Junio C Hamanod7ed4042015-08-03 19:43:0065This option may be specified multiple times.
Junio C Hamano97f518c2006-06-22 19:49:3566
Junio C Hamano86f75882006-02-06 02:27:2367--compose::
Junio C Hamano3b70d3c2009-11-21 17:37:3768Invoke a text editor (see GIT_EDITOR in linkgit:git-var[1])
69to edit an introductory message for the patch series.
Junio C Hamano610d1762008-11-28 06:27:1370+
Junio C Hamano92d80372016-07-13 22:00:0571When `--compose` is used, git send-email will use the From, Subject, and
Junio C Hamanoea82cff2009-03-18 01:54:4872In-Reply-To headers specified in the message. If the body of the message
73(what you type after the headers and a blank line) only contains blank
Junio C Hamanoe1aeb5e2014-06-06 19:16:2974(or Git: prefixed) lines, the summary won't be sent, but From, Subject,
Junio C Hamanoea82cff2009-03-18 01:54:4875and In-Reply-To headers will be used unless they are removed.
Junio C Hamano610d1762008-11-28 06:27:1376+
Junio C Hamanoea82cff2009-03-18 01:54:4877Missing From or In-Reply-To headers will be prompted for.
Junio C Hamano3d141512009-06-01 01:22:4078+
Junio C Hamano042f2142016-06-27 18:05:0579See the CONFIGURATION section for `sendemail.multiEdit`.
Junio C Hamano86f75882006-02-06 02:27:2380
Junio C Hamanob4a9ede2009-04-08 07:36:3281--from=<address>::
Junio C Hamano7ae18252009-05-23 09:53:3282Specify the sender of the emails. If not specified on the command line,
Junio C Hamano042f2142016-06-27 18:05:0583the value of the `sendemail.from` configuration option is used. If
84neither the command-line option nor `sendemail.from` are set, then the
Junio C Hamano7ae18252009-05-23 09:53:3285user will be prompted for the value. The default for the prompt will be
86the value of GIT_AUTHOR_IDENT, or GIT_COMMITTER_IDENT if that is not
87set, as returned by "git var -l".
Junio C Hamano86f75882006-02-06 02:27:2388
Junio C Hamano8b40d4b2018-03-15 22:52:3389--reply-to=<address>::
90Specify the address where replies from recipients should go to.
91Use this if replies to messages should go to another address than what
92is specified with the --from parameter.
93
Junio C Hamanob4a9ede2009-04-08 07:36:3294--in-reply-to=<identifier>::
Junio C Hamano97bcb482010-11-25 03:16:0795Make the first mail (or all the mails with `--no-thread`) appear as a
96reply to the given Message-Id, which avoids breaking threads to
97provide a new patch series.
98The second and subsequent emails will be sent as replies according to
Junio C Hamanocb06ef92017-03-21 22:40:1499the `--[no-]chain-reply-to` setting.
Junio C Hamano97bcb482010-11-25 03:16:07100+
101So for example when `--thread` and `--no-chain-reply-to` are specified, the
102second and subsequent patches will be replies to the first one like in the
103illustration below where `[PATCH v2 0/3]` is in reply to `[PATCH 0/2]`:
104+
105 [PATCH 0/2] Here is what I did...
106 [PATCH 1/2] Clean up and tests
107 [PATCH 2/2] Implementation
108 [PATCH v2 0/3] Here is a reroll
109 [PATCH v2 1/3] Clean up
110 [PATCH v2 2/3] New tests
111 [PATCH v2 3/3] Implementation
112+
113Only necessary if --compose is also set. If --compose
114is not set, this will be prompted for.
Junio C Hamano86f75882006-02-06 02:27:23115
Junio C Hamanob4a9ede2009-04-08 07:36:32116--subject=<string>::
Junio C Hamanoa476efa2008-10-10 15:31:42117Specify the initial subject of the email thread.
118Only necessary if --compose is also set. If --compose
119is not set, this will be prompted for.
Junio C Hamanoc9154122006-02-15 02:22:06120
Junio C Hamanod7ed4042015-08-03 19:43:00121--to=<address>,...::
Junio C Hamanoa476efa2008-10-10 15:31:42122Specify the primary recipient of the emails generated. Generally, this
123will be the upstream maintainer of the project involved. Default is the
Junio C Hamano042f2142016-06-27 18:05:05124value of the `sendemail.to` configuration value; if that is unspecified,
Junio C Hamano39c7a692010-10-27 06:08:54125and --to-cmd is not specified, this will be prompted for.
Junio C Hamanoa476efa2008-10-10 15:31:42126+
Junio C Hamanod7ed4042015-08-03 19:43:00127This option may be specified multiple times.
Junio C Hamano86f75882006-02-06 02:27:23128
Junio C Hamano4015aed2010-06-27 20:07:42129--8bit-encoding=<encoding>::
130When encountering a non-ASCII message or subject that does not
131declare its encoding, add headers/quoting to indicate it is
132encoded in <encoding>. Default is the value of the
133'sendemail.assume8bitEncoding'; if that is unspecified, this
134will be prompted for if any non-ASCII files are encountered.
135+
136Note that no attempts whatsoever are made to validate the encoding.
137
Junio C Hamanoa1295452012-11-13 22:32:04138--compose-encoding=<encoding>::
139Specify encoding of compose message. Default is the value of the
140'sendemail.composeencoding'; if that is unspecified, UTF-8 is assumed.
141
Junio C Hamano1ff03382018-07-25 22:10:48142--transfer-encoding=(7bit|8bit|quoted-printable|base64|auto)::
Junio C Hamano6df93d92014-12-22 22:48:09143Specify the transfer encoding to be used to send the message over SMTP.
1447bit will fail upon encountering a non-ASCII message. quoted-printable
145can be useful when the repository contains files that contain carriage
146returns, but makes the raw patch email file (as saved from a MUA) much
147harder to inspect manually. base64 is even more fool proof, but also
Junio C Hamano1ff03382018-07-25 22:10:48148even more opaque. auto will use 8bit when possible, and quoted-printable
149otherwise.
150+
151Default is the value of the `sendemail.transferEncoding` configuration
152value; if that is unspecified, default to `auto`.
Junio C Hamano6df93d92014-12-22 22:48:09153
Junio C Hamanoc9394b22015-01-07 22:45:48154--xmailer::
155--no-xmailer::
156Add (or prevent adding) the "X-Mailer:" header. By default,
157the header is added, but it can be turned off by setting the
158`sendemail.xmailer` configuration variable to `false`.
Junio C Hamanoa476efa2008-10-10 15:31:42159
160Sending
161~~~~~~~
162
Junio C Hamanob4a9ede2009-04-08 07:36:32163--envelope-sender=<address>::
Junio C Hamanoa476efa2008-10-10 15:31:42164Specify the envelope sender used to send the emails.
165This is useful if your default address is not the address that is
Junio C Hamano2bd8a742009-12-01 21:16:59166subscribed to a list. In order to use the 'From' address, set the
167value to "auto". If you use the sendmail binary, you must have
168suitable privileges for the -f parameter. Default is the value of the
Junio C Hamano042f2142016-06-27 18:05:05169`sendemail.envelopeSender` configuration variable; if that is
Junio C Hamanoa476efa2008-10-10 15:31:42170unspecified, choosing the envelope sender is left to your MTA.
171
Junio C Hamano01009d52021-06-14 06:32:20172--sendmail-cmd=<command>::
173Specify a command to run to send the email. The command should
174be sendmail-like; specifically, it must support the `-i` option.
175The command will be executed in the shell if necessary. Default
176is the value of `sendemail.sendmailcmd`. If unspecified, and if
177--smtp-server is also unspecified, git-send-email will search
178for `sendmail` in `/usr/sbin`, `/usr/lib` and $PATH.
179
Junio C Hamanob4a9ede2009-04-08 07:36:32180--smtp-encryption=<encryption>::
Junio C Hamanoa476efa2008-10-10 15:31:42181Specify the encryption to use, either 'ssl' or 'tls'. Any other
182value reverts to plain SMTP. Default is the value of
Junio C Hamano042f2142016-06-27 18:05:05183`sendemail.smtpEncryption`.
Junio C Hamanoa476efa2008-10-10 15:31:42184
Junio C Hamanocb39aea2010-05-09 07:24:48185--smtp-domain=<FQDN>::
186Specifies the Fully Qualified Domain Name (FQDN) used in the
187HELO/EHLO command to the SMTP server. Some servers require the
188FQDN to match your IP address. If not set, git send-email attempts
189to determine your FQDN automatically. Default is the value of
Junio C Hamano042f2142016-06-27 18:05:05190`sendemail.smtpDomain`.
Junio C Hamanocb39aea2010-05-09 07:24:48191
Junio C Hamanoa1746be2015-08-26 23:07:07192--smtp-auth=<mechanisms>::
193Whitespace-separated list of allowed SMTP-AUTH mechanisms. This setting
194forces using only the listed mechanisms. Example:
195+
196------
197$ git send-email --smtp-auth="PLAIN LOGIN GSSAPI" ...
198------
199+
200If at least one of the specified mechanisms matches the ones advertised by the
201SMTP server and if it is supported by the utilized SASL library, the mechanism
Junio C Hamano92d80372016-07-13 22:00:05202is used for authentication. If neither 'sendemail.smtpAuth' nor `--smtp-auth`
Junio C Hamano46fbbcb2018-11-07 03:54:16203is specified, all mechanisms supported by the SASL library can be used. The
204special value 'none' maybe specified to completely disable authentication
205independently of `--smtp-user`
Junio C Hamanoa1746be2015-08-26 23:07:07206
Junio C Hamanob4a9ede2009-04-08 07:36:32207--smtp-pass[=<password>]::
Junio C Hamanoa476efa2008-10-10 15:31:42208Password for SMTP-AUTH. The argument is optional: If no
209argument is specified, then the empty string is used as
Junio C Hamano042f2142016-06-27 18:05:05210the password. Default is the value of `sendemail.smtpPass`,
Junio C Hamano92d80372016-07-13 22:00:05211however `--smtp-pass` always overrides this value.
Junio C Hamanoa476efa2008-10-10 15:31:42212+
213Furthermore, passwords need not be specified in configuration files
214or on the command line. If a username has been specified (with
Junio C Hamano92d80372016-07-13 22:00:05215`--smtp-user` or a `sendemail.smtpUser`), but no password has been
216specified (with `--smtp-pass` or `sendemail.smtpPass`), then
Junio C Hamano5e7f1312013-03-21 22:49:01217a password is obtained using 'git-credential'.
Junio C Hamano68522892007-09-06 01:33:41218
Junio C Hamano46fbbcb2018-11-07 03:54:16219--no-smtp-auth::
220Disable SMTP authentication. Short hand for `--smtp-auth=none`
221
Junio C Hamanob4a9ede2009-04-08 07:36:32222--smtp-server=<host>::
Junio C Hamanob63afff2007-05-01 03:05:55223If set, specifies the outgoing SMTP server to use (e.g.
Junio C Hamano01009d52021-06-14 06:32:20224`smtp.example.com` or a raw IP address). If unspecified, and if
225`--sendmail-cmd` is also unspecified, the default is to search
226for `sendmail` in `/usr/sbin`, `/usr/lib` and $PATH if such a
227program is available, falling back to `localhost` otherwise.
228+
229For backward compatibility, this option can also specify a full pathname
230of a sendmail-like program instead; the program must support the `-i`
231option. This method does not support passing arguments or using plain
232command names. For those use cases, consider using `--sendmail-cmd`
233instead.
Junio C Hamano1a4e8412005-12-27 08:17:23234
Junio C Hamanob4a9ede2009-04-08 07:36:32235--smtp-server-port=<port>::
Junio C Hamano4fd58d42007-09-30 00:51:14236Specifies a port different from the default port (SMTP
Junio C Hamanobacccda2009-08-03 08:07:12237servers typically listen to smtp port 25, but may also listen to
238submission port 587, or the common SSL smtp port 465);
239symbolic port names (e.g. "submission" instead of 587)
Junio C Hamano3d141512009-06-01 01:22:40240are also accepted. The port can also be set with the
Junio C Hamano042f2142016-06-27 18:05:05241`sendemail.smtpServerPort` configuration variable.
Junio C Hamanofce7c7e2008-07-02 03:06:38242
Junio C Hamano39c7a692010-10-27 06:08:54243--smtp-server-option=<option>::
244If set, specifies the outgoing SMTP server option to use.
Junio C Hamano042f2142016-06-27 18:05:05245Default value can be specified by the `sendemail.smtpServerOption`
Junio C Hamano39c7a692010-10-27 06:08:54246configuration option.
247+
248The --smtp-server-option option must be repeated for each option you want
249to pass to the server. Likewise, different lines in the configuration files
250must be used for each option.
251
Junio C Hamano68522892007-09-06 01:33:41252--smtp-ssl::
Junio C Hamanoa476efa2008-10-10 15:31:42253Legacy alias for '--smtp-encryption ssl'.
Junio C Hamano68522892007-09-06 01:33:41254
Junio C Hamano58f587a2013-07-22 19:20:59255--smtp-ssl-cert-path::
Junio C Hamanoe8acc8e2015-01-14 22:01:34256Path to a store of trusted CA certificates for SMTP SSL/TLS
257certificate validation (either a directory that has been processed
258by 'c_rehash', or a single file containing one or more PEM format
259certificates concatenated together: see verify(1) -CAfile and
260-CApath for more information on these). Set it to an empty string
261to disable certificate verification. Defaults to the value of the
Junio C Hamano042f2142016-06-27 18:05:05262`sendemail.smtpsslcertpath` configuration variable, if set, or the
Junio C Hamanoe8acc8e2015-01-14 22:01:34263backing SSL library's compiled-in default otherwise (which should
264be the best choice on most platforms).
Junio C Hamano58f587a2013-07-22 19:20:59265
Junio C Hamanob4a9ede2009-04-08 07:36:32266--smtp-user=<user>::
Junio C Hamano042f2142016-06-27 18:05:05267Username for SMTP-AUTH. Default is the value of `sendemail.smtpUser`;
Junio C Hamano92d80372016-07-13 22:00:05268if a username is not specified (with `--smtp-user` or `sendemail.smtpUser`),
Junio C Hamanoa476efa2008-10-10 15:31:42269then authentication is not attempted.
Junio C Hamano86f75882006-02-06 02:27:23270
Junio C Hamano6ebd8042012-02-28 00:17:40271--smtp-debug=0|1::
272Enable (1) or disable (0) debug output. If enabled, SMTP
273commands and replies will be printed. Useful to debug TLS
274connection and authentication problems.
Junio C Hamanoa476efa2008-10-10 15:31:42275
Junio C Hamano08a3a232017-07-07 02:28:44276--batch-size=<num>::
277Some email servers (e.g. smtp.163.com) limit the number emails to be
Junio C Hamano96153bf2018-04-25 08:25:34278sent per session (connection) and this will lead to a failure when
Junio C Hamano08a3a232017-07-07 02:28:44279sending many messages. With this option, send-email will disconnect after
280sending $<num> messages and wait for a few seconds (see --relogin-delay)
281and reconnect, to work around such a limit. You may want to
282use some form of credential helper to avoid having to retype
283your password every time this happens. Defaults to the
284`sendemail.smtpBatchSize` configuration variable.
285
286--relogin-delay=<int>::
287Waiting $<int> seconds before reconnecting to SMTP server. Used together
288with --batch-size option. Defaults to the `sendemail.smtpReloginDelay`
289configuration variable.
290
Junio C Hamanoa476efa2008-10-10 15:31:42291Automating
292~~~~~~~~~~
293
Junio C Hamano51937872019-06-13 22:09:30294--no-[to|cc|bcc]::
295Clears any list of "To:", "Cc:", "Bcc:" addresses previously
296set via config.
297
298--no-identity::
299Clears the previously read value of `sendemail.identity` set
300via config, if any.
301
Junio C Hamano39c7a692010-10-27 06:08:54302--to-cmd=<command>::
303Specify a command to execute once per patch file which
304should generate patch file specific "To:" entries.
305Output of this command must be single email address per line.
306Default is the value of 'sendemail.tocmd' configuration value.
307
Junio C Hamanob4a9ede2009-04-08 07:36:32308--cc-cmd=<command>::
Junio C Hamanoa476efa2008-10-10 15:31:42309Specify a command to execute once per patch file which
310should generate patch file specific "Cc:" entries.
311Output of this command must be single email address per line.
Junio C Hamano042f2142016-06-27 18:05:05312Default is the value of `sendemail.ccCmd` configuration value.
Junio C Hamanoa476efa2008-10-10 15:31:42313
Junio C Hamano25e7ba62009-06-14 01:03:22314--[no-]chain-reply-to::
Junio C Hamanoa476efa2008-10-10 15:31:42315If this is set, each email will be sent as a reply to the previous
316email sent. If disabled with "--no-chain-reply-to", all emails after
317the first will be sent as replies to the first email sent. When using
318this, it is recommended that the first file given be an overview of the
Junio C Hamano042f2142016-06-27 18:05:05319entire patch series. Disabled by default, but the `sendemail.chainReplyTo`
Junio C Hamano096dde22009-12-26 23:14:11320configuration variable can be used to enable it.
Junio C Hamanoa476efa2008-10-10 15:31:42321
Junio C Hamanob4a9ede2009-04-08 07:36:32322--identity=<identity>::
Junio C Hamanoa476efa2008-10-10 15:31:42323A configuration identity. When given, causes values in the
324'sendemail.<identity>' subsection to take precedence over
325values in the 'sendemail' section. The default identity is
Junio C Hamano042f2142016-06-27 18:05:05326the value of `sendemail.identity`.
Junio C Hamanoa476efa2008-10-10 15:31:42327
328--[no-]signed-off-by-cc::
Junio C Hamanodf3d3cd2020-11-02 22:05:05329If this is set, add emails found in the `Signed-off-by` trailer or Cc: lines to the
Junio C Hamano042f2142016-06-27 18:05:05330cc list. Default is the value of `sendemail.signedoffbycc` configuration
Junio C Hamanoa476efa2008-10-10 15:31:42331value; if that is unspecified, default to --signed-off-by-cc.
Junio C Hamanoc9154122006-02-15 02:22:06332
Junio C Hamano45f804f2014-06-20 22:24:49333--[no-]cc-cover::
334If this is set, emails found in Cc: headers in the first patch of
335the series (typically the cover letter) are added to the cc list
336for each email set. Default is the value of 'sendemail.cccover'
337configuration value; if that is unspecified, default to --no-cc-cover.
338
339--[no-]to-cover::
340If this is set, emails found in To: headers in the first patch of
341the series (typically the cover letter) are added to the to list
342for each email set. Default is the value of 'sendemail.tocover'
343configuration value; if that is unspecified, default to --no-to-cover.
344
Junio C Hamanob4a9ede2009-04-08 07:36:32345--suppress-cc=<category>::
Junio C Hamano9c334152008-02-12 03:18:52346Specify an additional category of recipients to suppress the
Junio C Hamano0a235222009-03-06 08:21:09347auto-cc of:
348+
349--
Junio C Hamano94d00a52018-10-30 07:34:40350- 'author' will avoid including the patch author.
351- 'self' will avoid including the sender.
Junio C Hamano0a235222009-03-06 08:21:09352- 'cc' will avoid including anyone mentioned in Cc lines in the patch header
353 except for self (use 'self' for that).
Junio C Hamano0e88f3e2009-06-21 08:03:25354- 'bodycc' will avoid including anyone mentioned in Cc lines in the
Junio C Hamano0a235222009-03-06 08:21:09355 patch body (commit message) except for self (use 'self' for that).
Junio C Hamanodf3d3cd2020-11-02 22:05:05356- 'sob' will avoid including anyone mentioned in the Signed-off-by trailers except
Junio C Hamano94d00a52018-10-30 07:34:40357 for self (use 'self' for that).
358- 'misc-by' will avoid including anyone mentioned in Acked-by,
359 Reviewed-by, Tested-by and other "-by" lines in the patch body,
360 except Signed-off-by (use 'sob' for that).
Junio C Hamano0a235222009-03-06 08:21:09361- 'cccmd' will avoid running the --cc-cmd.
Junio C Hamano94d00a52018-10-30 07:34:40362- 'body' is equivalent to 'sob' + 'bodycc' + 'misc-by'.
Junio C Hamano0a235222009-03-06 08:21:09363- 'all' will suppress all auto cc values.
364--
365+
Junio C Hamano042f2142016-06-27 18:05:05366Default is the value of `sendemail.suppresscc` configuration value; if
Junio C Hamano0a235222009-03-06 08:21:09367that is unspecified, default to 'self' if --suppress-from is
368specified, as well as 'body' if --no-signed-off-cc is specified.
Junio C Hamano9c334152008-02-12 03:18:52369
Junio C Hamanoa476efa2008-10-10 15:31:42370--[no-]suppress-from::
371If this is set, do not add the From: address to the cc: list.
Junio C Hamano042f2142016-06-27 18:05:05372Default is the value of `sendemail.suppressFrom` configuration
Junio C Hamanoa476efa2008-10-10 15:31:42373value; if that is unspecified, default to --no-suppress-from.
374
375--[no-]thread::
Junio C Hamano1bbd0f42009-07-23 06:20:29376If this is set, the In-Reply-To and References headers will be
377added to each email sent. Whether each mail refers to the
378previous email (`deep` threading per 'git format-patch'
379wording) or to the first email (`shallow` threading) is
380governed by "--[no-]chain-reply-to".
381+
382If disabled with "--no-thread", those headers will not be added
383(unless specified with --in-reply-to). Default is the value of the
Junio C Hamano042f2142016-06-27 18:05:05384`sendemail.thread` configuration value; if that is unspecified,
Junio C Hamano1bbd0f42009-07-23 06:20:29385default to --thread.
386+
387It is up to the user to ensure that no In-Reply-To header already
388exists when 'git send-email' is asked to add it (especially note that
389'git format-patch' can be configured to do the threading itself).
390Failure to do so may not produce the expected result in the
391recipient's MUA.
Junio C Hamanoa476efa2008-10-10 15:31:42392
393
394Administering
395~~~~~~~~~~~~~
Junio C Hamanoddc5ad42007-06-27 07:14:52396
Junio C Hamanob4a9ede2009-04-08 07:36:32397--confirm=<mode>::
Junio C Hamano0a235222009-03-06 08:21:09398Confirm just before sending:
399+
400--
401- 'always' will always confirm before sending
402- 'never' will never confirm before sending
403- 'cc' will confirm before sending when send-email has automatically
404 added addresses from the patch to the Cc list
405- 'compose' will confirm before sending the first message when using --compose.
406- 'auto' is equivalent to 'cc' + 'compose'
407--
408+
Junio C Hamano042f2142016-06-27 18:05:05409Default is the value of `sendemail.confirm` configuration value; if that
Junio C Hamano0a235222009-03-06 08:21:09410is unspecified, default to 'auto' unless any of the suppress options
411have been specified, in which case default to 'compose'.
412
Junio C Hamano45889b42007-04-26 07:20:04413--dry-run::
414Do everything except actually send the emails.
415
Junio C Hamano3d141512009-06-01 01:22:40416--[no-]format-patch::
417When an argument may be understood either as a reference or as a file name,
Junio C Hamano92d80372016-07-13 22:00:05418choose to understand it as a format-patch argument (`--format-patch`)
419or as a file name (`--no-format-patch`). By default, when such a conflict
Junio C Hamano3d141512009-06-01 01:22:40420occurs, git send-email will fail.
421
Junio C Hamanoa476efa2008-10-10 15:31:42422--quiet::
423Make git-send-email less verbose. One line per email should be
424all that is output.
Junio C Hamano45889b42007-04-26 07:20:04425
Junio C Hamanoa476efa2008-10-10 15:31:42426--[no-]validate::
427Perform sanity checks on patches.
428Currently, validation means the following:
Junio C Hamanoa3fd83c2007-03-02 10:34:36429+
Junio C Hamanoa476efa2008-10-10 15:31:42430--
Junio C Hamanod88ba732017-05-30 04:14:20431* Invoke the sendemail-validate hook if present (see linkgit:githooks[5]).
Junio C Hamano1ff03382018-07-25 22:10:48432* Warn of patches that contain lines longer than
433998 characters unless a suitable transfer encoding
434('auto', 'base64', or 'quoted-printable') is used;
435this is due to SMTP limits as described by
436http://www.ietf.org/rfc/rfc5322.txt.
Junio C Hamanoa476efa2008-10-10 15:31:42437--
438+
Junio C Hamano042f2142016-06-27 18:05:05439Default is the value of `sendemail.validate`; if this is not set,
Junio C Hamano92d80372016-07-13 22:00:05440default to `--validate`.
Junio C Hamano97f518c2006-06-22 19:49:35441
Junio C Hamanocf29d332010-12-11 07:28:56442--force::
443Send emails even if safety checks would prevent it.
444
Junio C Hamano1a4e8412005-12-27 08:17:23445
Junio C Hamanoabb8a052015-12-04 22:43:11446Information
447~~~~~~~~~~~
448
449--dump-aliases::
450Instead of the normal operation, dump the shorthand alias names from
451the configured alias file(s), one per line in alphabetical order. Note,
452this only includes the alias name and not its expanded email addresses.
453See 'sendemail.aliasesfile' for more information about aliases.
454
455
Junio C Hamanoc51fede2007-03-12 07:29:20456CONFIGURATION
457-------------
Junio C Hamano68522892007-09-06 01:33:41458
Junio C Hamano322c6242015-03-23 21:32:46459sendemail.aliasesFile::
Junio C Hamanoc51fede2007-03-12 07:29:20460To avoid typing long email addresses, point this to one or more
Junio C Hamano042f2142016-06-27 18:05:05461email aliases files. You must also supply `sendemail.aliasFileType`.
Junio C Hamanoc51fede2007-03-12 07:29:20462
Junio C Hamano322c6242015-03-23 21:32:46463sendemail.aliasFileType::
464Format of the file(s) specified in sendemail.aliasesFile. Must be
Junio C Hamanoce447ab2015-06-16 22:08:01465one of 'mutt', 'mailrc', 'pine', 'elm', or 'gnus', or 'sendmail'.
466+
467What an alias file in each format looks like can be found in
468the documentation of the email program of the same name. The
469differences and limitations from the standard formats are
470described below:
471+
472--
473sendmail;;
474* Quoted aliases and quoted addresses are not supported: lines that
475contain a `"` symbol are ignored.
Junio C Hamanodf5384b2015-06-24 21:12:12476* Redirection to a file (`/path/name`) or pipe (`|command`) is not
477supported.
478* File inclusion (`:include: /path/name`) is not supported.
Junio C Hamanoce447ab2015-06-16 22:08:01479* Warnings are printed on the standard error output for any
480explicitly unsupported constructs, and any other lines that are not
481recognized by the parser.
482--
Junio C Hamanoc51fede2007-03-12 07:29:20483
Junio C Hamano322c6242015-03-23 21:32:46484sendemail.multiEdit::
Junio C Hamano610d1762008-11-28 06:27:13485If true (default), a single editor instance will be spawned to edit
Junio C Hamano92d80372016-07-13 22:00:05486files you have to edit (patches when `--annotate` is used, and the
487summary when `--compose` is used). If false, files will be edited one
Junio C Hamano610d1762008-11-28 06:27:13488after the other, spawning a new editor each time.
489
Junio C Hamano0a235222009-03-06 08:21:09490sendemail.confirm::
491Sets the default for whether to confirm before sending. Must be
Junio C Hamano92d80372016-07-13 22:00:05492one of 'always', 'never', 'cc', 'compose', or 'auto'. See `--confirm`
Junio C Hamano0a235222009-03-06 08:21:09493in the previous section for the meaning of these values.
494
Junio C Hamanob9d9d902018-05-23 07:07:42495EXAMPLES
496--------
Junio C Hamanofacbe512010-05-05 02:42:36497Use gmail as the smtp server
Junio C Hamanob77f8192011-05-05 01:30:38498~~~~~~~~~~~~~~~~~~~~~~~~~~~~
499To use 'git send-email' to send your patches through the GMail SMTP server,
500edit ~/.gitconfig to specify your account settings:
Junio C Hamanofacbe512010-05-05 02:42:36501
Junio C Hamano48cd3f12019-10-09 05:55:30502----
503[sendemail]
504smtpEncryption = tls
505smtpServer = smtp.gmail.com
506smtpUser = yourname@gmail.com
507smtpServerPort = 587
508----
Junio C Hamanofacbe512010-05-05 02:42:36509
Junio C Hamano7887f9b2021-01-25 23:32:33510If you have multi-factor authentication set up on your Gmail account, you will
Junio C Hamano37cf4082016-05-30 01:22:14511need to generate an app-specific password for use with 'git send-email'. Visit
Junio C Hamano96153bf2018-04-25 08:25:34512https://security.google.com/settings/security/apppasswords to create it.
Junio C Hamano37cf4082016-05-30 01:22:14513
Junio C Hamano7887f9b2021-01-25 23:32:33514If you do not have multi-factor authentication set up on your Gmail account,
515you will need to allow less secure app access. Visit
516https://myaccount.google.com/lesssecureapps to enable it.
517
Junio C Hamanob77f8192011-05-05 01:30:38518Once your commits are ready to be sent to the mailing list, run the
519following commands:
520
521$ git format-patch --cover-letter -M origin/master -o outgoing/
522$ edit outgoing/0000-*
523$ git send-email outgoing/*
524
Junio C Hamano96153bf2018-04-25 08:25:34525The first time you run it, you will be prompted for your credentials. Enter the
526app-specific or your regular password as appropriate. If you have credential
527helper configured (see linkgit:git-credential[1]), the password will be saved in
528the credential store so you won't have to type it the next time.
529
Junio C Hamanod0a99402019-06-21 18:58:41530Note: the following core Perl modules that may be installed with your
531distribution of Perl are required:
532MIME::Base64, MIME::QuotedPrint, Net::Domain and Net::SMTP.
533These additional Perl modules are also required:
534Authen::SASL and Mail::Address.
535
Junio C Hamanofacbe512010-05-05 02:42:36536
Junio C Hamanob77f8192011-05-05 01:30:38537SEE ALSO
538--------
539linkgit:git-format-patch[1], linkgit:git-imap-send[1], mbox(5)
540
Junio C Hamano1a4e8412005-12-27 08:17:23541GIT
542---
Junio C Hamanof7c042d2008-06-06 22:50:53543Part of the linkgit:git[1] suite