'\" t .\" Title: stg-mail .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: 09/02/2017 .\" Manual: StGit Manual .\" Source: StGit .\" Language: English .\" .TH "STG\-MAIL" "1" "09/02/2017" "StGit" "StGit 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" stg-mail \- Send a patch or series of patches by e\-mail .SH "SYNOPSIS" .sp .nf \fIstg\fR mail [options] [\-\-] [] [] [\&.\&.] .fi .SH "DESCRIPTION" Send a patch or a range of patches by e\-mail using the SMTP server specified by the \fIstgit\&.smtpserver\fR configuration option, or the \fI\-\-smtp\-server\fR command line option\&. This option can also be an absolute path to \fIsendmail\fR followed by command line arguments\&. The From address and the e\-mail format are generated from the template file passed as argument to \fI\-\-template\fR (defaulting to \fI\&.git/patchmail\&.tmpl\fR or \fI~/\&.stgit/templates/patchmail\&.tmpl\fR or \fI/usr/share/stgit/templates/patchmail\&.tmpl\fR)\&. A patch can be sent as attachment using the \-\-attach option in which case the \fImailattch\&.tmpl\fR template will be used instead of \fIpatchmail\&.tmpl\fR\&. The To/Cc/Bcc addresses can either be added to the template file or passed via the corresponding command line options\&. They can be e\-mail addresses or aliases which are automatically expanded to the values stored in the [mail "alias"] section of GIT configuration files\&. A preamble e\-mail can be sent using the \fI\-\-cover\fR and/or \fI\-\-edit\-cover\fR options\&. The first allows the user to specify a file to be used as a template\&. The latter option will invoke the editor on the specified file (defaulting to \fI\&.git/covermail\&.tmpl\fR or \fI~/\&.stgit/templates/covermail\&.tmpl\fR or \fI/usr/share/stgit/templates/covermail\&.tmpl\fR)\&. All the subsequent e\-mails appear as replies to the first e\-mail sent (either the preamble or the first patch)\&. E\-mails can be seen as replies to a different e\-mail by using the \fI\-\-in\-reply\-to\fR option\&. SMTP authentication is also possible with \fI\-\-smtp\-user\fR and \fI\-\-smtp\-password\fR options, also available as configuration settings: \fIsmtpuser\fR and \fIsmtppassword\fR\&. TLS encryption can be enabled by \fI\-\-smtp\-tls\fR option and \fIsmtptls\fR setting\&. The following variables are accepted by both the preamble and the patch e\-mail templates: .sp .if n \{\ .RS 4 .\} .nf %(diffstat)s \- diff statistics %(number)s \- empty if only one patch is sent or \*(Aqpatchnr/totalnr\*(Aq %(snumber)s \- stripped version of \*(Aq%(number)s\*(Aq %(nspace)s \- \*(Aq \*(Aq if %(number)s is non\-empty, otherwise empty string %(patchnr)s \- patch number %(sender)s \- \*(Aqsender\*(Aq or \*(Aqauthname \*(Aq as per the config file %(totalnr)s \- total number of patches to be sent %(version)s \- \*(Aqversion\*(Aq string passed on the command line (or empty) %(vspace)s \- \*(Aq \*(Aq if %(version)s is non\-empty, otherwise empty string .fi .if n \{\ .RE .\} .sp In addition to the common variables, the preamble e\-mail template accepts the following: .sp .if n \{\ .RS 4 .\} .nf %(shortlog)s \- first line of each patch description, listed by author .fi .if n \{\ .RE .\} .sp In addition to the common variables, the patch e\-mail template accepts the following: .sp .if n \{\ .RS 4 .\} .nf %(authdate)s \- patch creation date %(authemail)s \- author\*(Aqs email %(authname)s \- author\*(Aqs name %(commemail)s \- committer\*(Aqs e\-mail %(commname)s \- committer\*(Aqs name %(diff)s \- unified diff of the patch %(fromauth)s \- \*(AqFrom: author\en\en\*(Aq if different from sender %(longdescr)s \- the rest of the patch description, after the first line %(patch)s \- patch name %(prefix)s \- \*(Aqprefix\*(Aq string passed on the command line %(pspace)s \- \*(Aq \*(Aq if %(prefix)s is non\-empty, otherwise empty string %(shortdescr)s \- the first line of the patch description .fi .if n \{\ .RE .\} .SH "OPTIONS" .PP \-a, \-\-all .RS 4 E\-mail all the applied patches\&. .RE .PP \-\-to TO .RS 4 Add TO to the To: list\&. .RE .PP \-\-cc CC .RS 4 Add CC to the Cc: list\&. .RE .PP \-\-bcc BCC .RS 4 Add BCC to the Bcc: list\&. .RE .PP \-\-auto .RS 4 Automatically cc the patch signers\&. .RE .PP \-\-no\-thread .RS 4 Do not send subsequent messages as replies\&. .RE .PP \-\-unrelated .RS 4 Send patches without sequence numbering\&. .RE .PP \-\-attach .RS 4 Send a patch as attachment\&. .RE .PP \-\-attach\-inline .RS 4 Send a patch inline and as an attachment\&. .RE .PP \-v VERSION, \-\-version VERSION .RS 4 Add VERSION to the [PATCH \&...] prefix\&. .RE .PP \-\-prefix PREFIX .RS 4 Add PREFIX to the [\&... PATCH \&...] prefix\&. .RE .PP \-t FILE, \-\-template FILE .RS 4 Use FILE as the message template\&. .RE .PP \-c FILE, \-\-cover FILE .RS 4 Send FILE as the cover message\&. .RE .PP \-e, \-\-edit\-cover .RS 4 Edit the cover message before sending\&. .RE .PP \-E, \-\-edit\-patches .RS 4 Edit each patch before sending\&. .RE .PP \-s SECONDS, \-\-sleep SECONDS .RS 4 Sleep for SECONDS between e\-mails sending\&. .RE .PP \-\-in\-reply\-to REFID .RS 4 Use REFID as the reference id\&. .RE .PP \-\-smtp\-server HOST[:PORT] or "/path/to/sendmail \-t \-i" .RS 4 SMTP server or command to use for sending mail\&. .RE .PP \-u USER, \-\-smtp\-user USER .RS 4 Username for SMTP authentication\&. .RE .PP \-p PASSWORD, \-\-smtp\-password PASSWORD .RS 4 Password for SMTP authentication\&. .RE .PP \-T, \-\-smtp\-tls .RS 4 Use SMTP with TLS encryption\&. .RE .PP \-b BRANCH, \-\-branch BRANCH .RS 4 Use BRANCH instead of the default branch\&. .RE .PP \-m, \-\-mbox .RS 4 Generate an mbox file instead of sending\&. .RE .PP \-\-git .RS 4 Use git send\-email (EXPERIMENTAL)\&. .RE .PP \-O OPTIONS, \-\-diff\-opts OPTIONS .RS 4 Extra options to pass to "git diff"\&. .RE .SH "STGIT" Part of the StGit suite \- see \fBstg\fR(1)