Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/Documentation/git-send-email.adoc # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / Documentation / git-send-email.adoc` 726 lines ยท 29117 bytes Raw Blame History 1 git-send-email(1) 2 ================= 3 4 NAME 5 ---- 6 git-send-email - Send a collection of patches as emails 7 8 9 SYNOPSIS 10 -------- 11 [synopsis] 12 git send-email [] (|)... 13 git send-email [] 14 git send-email --dump-aliases 15 git send-email --translate-aliases 16 17 18 DESCRIPTION 19 ----------- 20 Takes the patches given on the command line and emails them out. 21 Patches can be specified as files, directories (which will send all 22 files in the directory), or directly as a revision list. In the 23 last case, any format accepted by linkgit:git-format-patch[1] can 24 be passed to `git send-email`, as well as options understood by 25 linkgit:git-format-patch[1]. 26 27 The header of the email is configurable via command-line options. If not 28 specified on the command line, the user will be prompted with a ReadLine 29 enabled interface to provide the necessary information. 30 31 There are two formats accepted for patch files: 32 33 1. mbox format files 34 + 35 This is what linkgit:git-format-patch[1] generates. Most headers and MIME 36 formatting are ignored. 37 38 2. The original format used by Greg Kroah-Hartman's `send_lots_of_email.pl` 39 script 40 + 41 This format expects the first line of the file to contain the `Cc:` value 42 and the `Subject:` of the message as the second line. 43 44 45 OPTIONS 46 ------- 47 48 Composing 49 ~~~~~~~~~ 50 51 `--annotate`:: 52 Review and edit each patch you're about to send. Default is the value 53 of `sendemail.annotate`. See the <> section for 54 `sendemail.multiEdit`. 55 56 `--bcc=
,...`:: 57 Specify a `Bcc:` value for each email. Default is the value of 58 `sendemail.bcc`. 59 + 60 This option may be specified multiple times. 61 62 `--cc=
,...`:: 63 Specify a starting `Cc:` value for each email. 64 Default is the value of `sendemail.cc`. 65 + 66 This option may be specified multiple times. 67 68 `--compose`:: 69 Invoke a text editor (see GIT_EDITOR in linkgit:git-var[1]) 70 to edit an introductory message for the patch series. 71 + 72 When `--compose` is used, `git send-email` will use the `From`, `To`, `Cc`, 73 `Bcc`, `Subject`, `Reply-To`, and `In-Reply-To` headers specified in the 74 message. If the body of the message (what you type after the headers and a 75 blank line) only contains blank (or `Git:` prefixed) lines, the summary won't be 76 sent, but the headers mentioned above will be used unless they are 77 removed. 78 + 79 Missing `From` or `In-Reply-To` headers will be prompted for. 80 + 81 See the <> section for `sendemail.multiEdit`. 82 83 `--from=
`:: 84 Specify the sender of the emails. If not specified on the command line, 85 the value of the `sendemail.from` configuration option is used. If 86 neither the command-line option nor `sendemail.from` are set, then the 87 user will be prompted for the value. The default for the prompt will be 88 the value of `GIT_AUTHOR_IDENT`, or `GIT_COMMITTER_IDENT` if that is not 89 set, as returned by `git var -l`. 90 91 `--reply-to=
`:: 92 Specify the address where replies from recipients should go to. 93 Use this if replies to messages should go to another address than what 94 is specified with the `--from` parameter. 95 96 `--in-reply-to=`:: 97 Make the first mail (or all the mails with `--no-thread`) appear as a 98 reply to the given Message-ID, which avoids breaking threads to 99 provide a new patch series. 100 The second and subsequent emails will be sent as replies according to 101 the `--[no-]chain-reply-to` setting. 102 + 103 So for example when `--thread` and `--no-chain-reply-to` are specified, the 104 second and subsequent patches will be replies to the first one like in the 105 illustration below where `[PATCH v2 0/3]` is in reply to `[PATCH 0/2]`: 106 + 107 [PATCH 0/2] Here is what I did... 108 [PATCH 1/2] Clean up and tests 109 [PATCH 2/2] Implementation 110 [PATCH v2 0/3] Here is a reroll 111 [PATCH v2 1/3] Clean up 112 [PATCH v2 2/3] New tests 113 [PATCH v2 3/3] Implementation 114 + 115 Only necessary if `--compose` is also set. If `--compose` 116 is not set, this will be prompted for. 117 118 `--outlook-id-fix`:: 119 `--no-outlook-id-fix`:: 120 Microsoft Outlook SMTP servers discard the Message-ID sent via email and 121 assign a new random Message-ID, thus breaking threads. 122 + 123 With `--outlook-id-fix`, `git send-email` uses a mechanism specific to 124 Outlook servers to learn the Message-ID the server assigned to fix the 125 threading. Use it only when you know that the server reports the 126 rewritten Message-ID the same way as Outlook servers do. 127 + 128 Without this option specified, the fix is done by default when talking 129 to `smtp.office365.com` or `smtp-mail.outlook.com`. Use 130 `--no-outlook-id-fix` to disable even when talking to these two servers. 131 132 `--subject=`:: 133 Specify the initial subject of the email thread. 134 Only necessary if `--compose` is also set. If `--compose` 135 is not set, this will be prompted for. 136 137 `--to=
,...`:: 138 Specify the primary recipient of the emails generated. Generally, this 139 will be the upstream maintainer of the project involved. Default is the 140 value of the `sendemail.to` configuration value; if that is unspecified, 141 and `--to-cmd` is not specified, this will be prompted for. 142 + 143 This option may be specified multiple times. 144 145 `--8bit-encoding=`:: 146 When encountering a non-ASCII message or subject that does not 147 declare its encoding, add headers/quoting to indicate it is 148 encoded in __. Default is the value of the 149 `sendemail.assume8bitEncoding`; if that is unspecified, this 150 will be prompted for if any non-ASCII files are encountered. 151 + 152 Note that no attempts whatsoever are made to validate the encoding. 153 154 `--compose-encoding=`:: 155 Specify encoding of compose message. Default is the value of the 156 `sendemail.composeEncoding`; if that is unspecified, UTF-8 is assumed. 157 158 `--transfer-encoding=(7bit|8bit|quoted-printable|base64|auto)`:: 159 Specify the transfer encoding to be used to send the message over SMTP. 160 `7bit` will fail upon encountering a non-ASCII message. `quoted-printable` 161 can be useful when the repository contains files that contain carriage 162 returns, but makes the raw patch email file (as saved from an MUA) much 163 harder to inspect manually. `base64` is even more fool proof, but also 164 even more opaque. `auto` will use `8bit` when possible, and 165 `quoted-printable` otherwise. 166 + 167 Default is the value of the `sendemail.transferEncoding` configuration 168 value; if that is unspecified, default to `auto`. 169 170 `--xmailer`:: 171 `--no-xmailer`:: 172 Add (or prevent adding) the `X-Mailer:` header. By default, 173 the header is added, but it can be turned off by setting the 174 `sendemail.xmailer` configuration variable to `false`. 175 176 Sending 177 ~~~~~~~ 178 179 `--envelope-sender=
`:: 180 Specify the envelope sender used to send the emails. 181 This is useful if your default address is not the address that is 182 subscribed to a list. In order to use the `From` address, set the 183 value to `auto`. If you use the `sendmail` binary, you must have 184 suitable privileges for the `-f` parameter. Default is the value of the 185 `sendemail.envelopeSender` configuration variable; if that is 186 unspecified, choosing the envelope sender is left to your MTA. 187 188 `--sendmail-cmd=`:: 189 Specify a command to run to send the email. The command should 190 be sendmail-like; specifically, it must support the `-i` option. 191 The command will be executed in the shell if necessary. Default 192 is the value of `sendemail.sendmailCmd`. If unspecified, and if 193 `--smtp-server` is also unspecified, `git send-email` will search 194 for `sendmail` in `/usr/sbin`, `/usr/lib` and `$PATH`. 195 196 `--smtp-encryption=`:: 197 Specify in what way encrypting begins for the SMTP connection. 198 Valid values are `ssl` and `tls`. Any other value reverts to plain 199 (unencrypted) SMTP, which defaults to port 25. 200 Despite the names, both values will use the same newer version of TLS, 201 but for historic reasons have these names. `ssl` refers to "implicit" 202 encryption (sometimes called SMTPS), that uses port 465 by default. 203 `tls` refers to "explicit" encryption (often known as STARTTLS), 204 that uses port 25 by default. Other ports might be used by the SMTP 205 server, which are not the default. Commonly found alternative port for 206 `tls` and unencrypted is 587. You need to check your provider's 207 documentation or your server configuration to make sure 208 for your own case. Default is the value of `sendemail.smtpEncryption`. 209 210 `--smtp-domain=`:: 211 Specify the Fully Qualified Domain Name (FQDN) used in the 212 HELO/EHLO command to the SMTP server. Some servers require the 213 FQDN to match your IP address. If not set, `git send-email` attempts 214 to determine your FQDN automatically. Default is the value of 215 `sendemail.smtpDomain`. 216 217 `--smtp-auth=`:: 218 Whitespace-separated list of allowed SMTP-AUTH mechanisms. This setting 219 forces using only the listed mechanisms. Example: 220 + 221 ------ 222 $ git send-email --smtp-auth="PLAIN LOGIN GSSAPI" ... 223 ------ 224 + 225 If at least one of the specified mechanisms matches the ones advertised by the 226 SMTP server and if it is supported by the utilized SASL library, the mechanism 227 is used for authentication. If neither `sendemail.smtpAuth` nor `--smtp-auth` 228 is specified, all mechanisms supported by the SASL library can be used. The 229 special value `none` maybe specified to completely disable authentication 230 independently of `--smtp-user`. 231 232 `--smtp-pass[=]`:: 233 Password for SMTP-AUTH. The argument is optional: If no 234 argument is specified, then the empty string is used as 235 the password. Default is the value of `sendemail.smtpPass`, 236 however `--smtp-pass` always overrides this value. 237 + 238 Furthermore, passwords need not be specified in configuration files 239 or on the command line. If a username has been specified (with 240 `--smtp-user` or a `sendemail.smtpUser`), but no password has been 241 specified (with `--smtp-pass` or `sendemail.smtpPass`), then 242 a password is obtained using linkgit:git-credential[1]. 243 244 `--no-smtp-auth`:: 245 Disable SMTP authentication. Short hand for `--smtp-auth=none`. 246 247 `--smtp-server=`:: 248 Specify the outgoing SMTP server to use (e.g. 249 `smtp.example.com` or a raw IP address). If unspecified, and if 250 `--sendmail-cmd` is also unspecified, the default is to search 251 for `sendmail` in `/usr/sbin`, `/usr/lib` and `$PATH` if such a 252 program is available, falling back to `localhost` otherwise. 253 + 254 For backward compatibility, this option can also specify a full pathname 255 of a sendmail-like program instead; the program must support the `-i` 256 option. This method does not support passing arguments or using plain 257 command names. For those use cases, consider using `--sendmail-cmd` 258 instead. 259 260 `--smtp-server-port=`:: 261 Specify a port different from the default port (SMTP 262 servers typically listen to smtp port 25, but may also listen to 263 submission port 587, or the common SSL smtp port 465); 264 symbolic port names (e.g. `submission` instead of 587) 265 are also accepted. The port can also be set with the 266 `sendemail.smtpServerPort` configuration variable. 267 268 `--smtp-server-option=