'\" t
.\" Title: git-send-email
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot
.\" Date: 01/14/2025
.\" Manual: Git Manual
.\" Source: Git 2.48.1
.\" Language: English
.\"
.TH "GIT\-SEND\-EMAIL" "1" "01/14/2025" "Git 2\&.48\&.1" "Git Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
git-send-email \- Send a collection of patches as emails
.SH "SYNOPSIS"
.sp
.nf
\fIgit send\-email\fR [] (|)\&...
\fIgit send\-email\fR []
\fIgit send\-email\fR \-\-dump\-aliases
\fIgit send\-email\fR \-\-translate\-aliases
.fi
.sp
.SH "DESCRIPTION"
.sp
Takes the patches given on the command line and emails them out\&. Patches can be specified as files, directories (which will send all files in the directory), or directly as a revision list\&. In the last case, any format accepted by \fBgit-format-patch\fR(1) can be passed to git send\-email, as well as options understood by \fBgit-format-patch\fR(1)\&.
.sp
The header of the email is configurable via command\-line options\&. If not specified on the command line, the user will be prompted with a ReadLine enabled interface to provide the necessary information\&.
.sp
There are two formats accepted for patch files:
.sp
.RS 4
.ie n \{\
\h'-04' 1.\h'+01'\c
.\}
.el \{\
.sp -1
.IP " 1." 4.2
.\}
mbox format files
.sp
This is what
\fBgit-format-patch\fR(1)
generates\&. Most headers and MIME formatting are ignored\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04' 2.\h'+01'\c
.\}
.el \{\
.sp -1
.IP " 2." 4.2
.\}
The original format used by Greg Kroah\-Hartman\(cqs
\fIsend_lots_of_email\&.pl\fR
script
.sp
This format expects the first line of the file to contain the "Cc:" value and the "Subject:" of the message as the second line\&.
.RE
.SH "OPTIONS"
.SS "Composing"
.PP
\-\-annotate
.RS 4
Review and edit each patch you\(cqre about to send\&. Default is the value of
\fBsendemail\&.annotate\fR\&. See the CONFIGURATION section for
\fBsendemail\&.multiEdit\fR\&.
.RE
.PP
\-\-bcc=,\&...
.RS 4
Specify a "Bcc:" value for each email\&. Default is the value of
\fBsendemail\&.bcc\fR\&.
.sp
This option may be specified multiple times\&.
.RE
.PP
\-\-cc=,\&...
.RS 4
Specify a starting "Cc:" value for each email\&. Default is the value of
\fBsendemail\&.cc\fR\&.
.sp
This option may be specified multiple times\&.
.RE
.PP
\-\-compose
.RS 4
Invoke a text editor (see GIT_EDITOR in
\fBgit-var\fR(1)) to edit an introductory message for the patch series\&.
.sp
When
\fB\-\-compose\fR
is used, git send\-email will use the From, To, Cc, Bcc, Subject, Reply\-To, and In\-Reply\-To headers specified in the message\&. If the body of the message (what you type after the headers and a blank line) only contains blank (or Git: prefixed) lines, the summary won\(cqt be sent, but the headers mentioned above will be used unless they are removed\&.
.sp
Missing From or In\-Reply\-To headers will be prompted for\&.
.sp
See the CONFIGURATION section for
\fBsendemail\&.multiEdit\fR\&.
.RE
.PP
\-\-from=
.RS 4
Specify the sender of the emails\&. If not specified on the command line, the value of the
\fBsendemail\&.from\fR
configuration option is used\&. If neither the command\-line option nor
\fBsendemail\&.from\fR
are set, then the user will be prompted for the value\&. The default for the prompt will be the value of GIT_AUTHOR_IDENT, or GIT_COMMITTER_IDENT if that is not set, as returned by "git var \-l"\&.
.RE
.PP
\-\-reply\-to=
.RS 4
Specify the address where replies from recipients should go to\&. Use this if replies to messages should go to another address than what is specified with the \-\-from parameter\&.
.RE
.PP
\-\-in\-reply\-to=
.RS 4
Make the first mail (or all the mails with
\fB\-\-no\-thread\fR) appear as a reply to the given Message\-ID, which avoids breaking threads to provide a new patch series\&. The second and subsequent emails will be sent as replies according to the
\fB\-\-\fR[\fBno\-\fR]\fBchain\-reply\-to\fR
setting\&.
.sp
So for example when
\fB\-\-thread\fR
and
\fB\-\-no\-chain\-reply\-to\fR
are specified, the second and subsequent patches will be replies to the first one like in the illustration below where [\fBPATCH\fR
\fBv2\fR
\fB0/3\fR] is in reply to [\fBPATCH\fR
\fB0/2\fR]:
.sp
.if n \{\
.RS 4
.\}
.nf
[PATCH 0/2] Here is what I did\&.\&.\&.
[PATCH 1/2] Clean up and tests
[PATCH 2/2] Implementation
[PATCH v2 0/3] Here is a reroll
[PATCH v2 1/3] Clean up
[PATCH v2 2/3] New tests
[PATCH v2 3/3] Implementation
.fi
.if n \{\
.RE
.\}
.sp
Only necessary if \-\-compose is also set\&. If \-\-compose is not set, this will be prompted for\&.
.RE
.PP
\-\-subject=
.RS 4
Specify the initial subject of the email thread\&. Only necessary if \-\-compose is also set\&. If \-\-compose is not set, this will be prompted for\&.
.RE
.PP
\-\-to=,\&...
.RS 4
Specify the primary recipient of the emails generated\&. Generally, this will be the upstream maintainer of the project involved\&. Default is the value of the
\fBsendemail\&.to\fR
configuration value; if that is unspecified, and \-\-to\-cmd is not specified, this will be prompted for\&.
.sp
This option may be specified multiple times\&.
.RE
.PP
\-\-8bit\-encoding=
.RS 4
When encountering a non\-ASCII message or subject that does not declare its encoding, add headers/quoting to indicate it is encoded in \&. Default is the value of the
\fIsendemail\&.assume8bitEncoding\fR; if that is unspecified, this will be prompted for if any non\-ASCII files are encountered\&.
.sp
Note that no attempts whatsoever are made to validate the encoding\&.
.RE
.PP
\-\-compose\-encoding=
.RS 4
Specify encoding of compose message\&. Default is the value of the
\fIsendemail\&.composeEncoding\fR; if that is unspecified, UTF\-8 is assumed\&.
.RE
.PP
\-\-transfer\-encoding=(7bit|8bit|quoted\-printable|base64|auto)
.RS 4
Specify the transfer encoding to be used to send the message over SMTP\&. 7bit will fail upon encountering a non\-ASCII message\&. quoted\-printable can be useful when the repository contains files that contain carriage returns, but makes the raw patch email file (as saved from a MUA) much harder to inspect manually\&. base64 is even more fool proof, but also even more opaque\&. auto will use 8bit when possible, and quoted\-printable otherwise\&.
.sp
Default is the value of the
\fBsendemail\&.transferEncoding\fR
configuration value; if that is unspecified, default to
\fBauto\fR\&.
.RE
.PP
\-\-xmailer, \-\-no\-xmailer
.RS 4
Add (or prevent adding) the "X\-Mailer:" header\&. By default, the header is added, but it can be turned off by setting the
\fBsendemail\&.xmailer\fR
configuration variable to
\fBfalse\fR\&.
.RE
.SS "Sending"
.PP
\-\-envelope\-sender=
.RS 4
Specify the envelope sender used to send the emails\&. This is useful if your default address is not the address that is subscribed to a list\&. In order to use the
\fIFrom\fR
address, set the value to "auto"\&. If you use the sendmail binary, you must have suitable privileges for the \-f parameter\&. Default is the value of the
\fBsendemail\&.envelopeSender\fR
configuration variable; if that is unspecified, choosing the envelope sender is left to your MTA\&.
.RE
.PP
\-\-sendmail\-cmd=
.RS 4
Specify a command to run to send the email\&. The command should be sendmail\-like; specifically, it must support the
\fB\-i\fR
option\&. The command will be executed in the shell if necessary\&. Default is the value of
\fBsendemail\&.sendmailCmd\fR\&. If unspecified, and if \-\-smtp\-server is also unspecified, git\-send\-email will search for
\fBsendmail\fR
in
\fB/usr/sbin\fR,
\fB/usr/lib\fR
and $PATH\&.
.RE
.PP
\-\-smtp\-encryption=
.RS 4
Specify in what way encrypting begins for the SMTP connection\&. Valid values are
\fIssl\fR
and
\fItls\fR\&. Any other value reverts to plain (unencrypted) SMTP, which defaults to port 25\&. Despite the names, both values will use the same newer version of TLS, but for historic reasons have these names\&.
\fIssl\fR
refers to "implicit" encryption (sometimes called SMTPS), that uses port 465 by default\&.
\fItls\fR
refers to "explicit" encryption (often known as STARTTLS), that uses port 25 by default\&. Other ports might be used by the SMTP server, which are not the default\&. Commonly found alternative port for
\fItls\fR
and unencrypted is 587\&. You need to check your provider\(cqs documentation or your server configuration to make sure for your own case\&. Default is the value of
\fBsendemail\&.smtpEncryption\fR\&.
.RE
.PP
\-\-smtp\-domain=
.RS 4
Specifies the Fully Qualified Domain Name (FQDN) used in the HELO/EHLO command to the SMTP server\&. Some servers require the FQDN to match your IP address\&. If not set, git send\-email attempts to determine your FQDN automatically\&. Default is the value of
\fBsendemail\&.smtpDomain\fR\&.
.RE
.PP
\-\-smtp\-auth=
.RS 4
Whitespace\-separated list of allowed SMTP\-AUTH mechanisms\&. This setting forces using only the listed mechanisms\&. Example:
.sp
.if n \{\
.RS 4
.\}
.nf
$ git send\-email \-\-smtp\-auth="PLAIN LOGIN GSSAPI" \&.\&.\&.
.fi
.if n \{\
.RE
.\}
.sp
If at least one of the specified mechanisms matches the ones advertised by the SMTP server and if it is supported by the utilized SASL library, the mechanism is used for authentication\&. If neither
\fIsendemail\&.smtpAuth\fR
nor
\fB\-\-smtp\-auth\fR
is specified, all mechanisms supported by the SASL library can be used\&. The special value
\fInone\fR
maybe specified to completely disable authentication independently of
\fB\-\-smtp\-user\fR
.RE
.PP
\-\-smtp\-pass[=]
.RS 4
Password for SMTP\-AUTH\&. The argument is optional: If no argument is specified, then the empty string is used as the password\&. Default is the value of
\fBsendemail\&.smtpPass\fR, however
\fB\-\-smtp\-pass\fR
always overrides this value\&.
.sp
Furthermore, passwords need not be specified in configuration files or on the command line\&. If a username has been specified (with
\fB\-\-smtp\-user\fR
or a
\fBsendemail\&.smtpUser\fR), but no password has been specified (with
\fB\-\-smtp\-pass\fR
or
\fBsendemail\&.smtpPass\fR), then a password is obtained using
\fIgit\-credential\fR\&.
.RE
.PP
\-\-no\-smtp\-auth
.RS 4
Disable SMTP authentication\&. Short hand for
\fB\-\-smtp\-auth=none\fR
.RE
.PP
\-\-smtp\-server=
.RS 4
If set, specifies the outgoing SMTP server to use (e\&.g\&.
\fBsmtp\&.example\&.com\fR
or a raw IP address)\&. If unspecified, and if
\fB\-\-sendmail\-cmd\fR
is also unspecified, the default is to search for
\fBsendmail\fR
in
\fB/usr/sbin\fR,
\fB/usr/lib\fR
and $PATH if such a program is available, falling back to
\fBlocalhost\fR
otherwise\&.
.sp
For backward compatibility, this option can also specify a full pathname of a sendmail\-like program instead; the program must support the
\fB\-i\fR
option\&. This method does not support passing arguments or using plain command names\&. For those use cases, consider using
\fB\-\-sendmail\-cmd\fR
instead\&.
.RE
.PP
\-\-smtp\-server\-port=
.RS 4
Specifies a port different from the default port (SMTP servers typically listen to smtp port 25, but may also listen to submission port 587, or the common SSL smtp port 465); symbolic port names (e\&.g\&. "submission" instead of 587) are also accepted\&. The port can also be set with the
\fBsendemail\&.smtpServerPort\fR
configuration variable\&.
.RE
.PP
\-\-smtp\-server\-option=