1STG-MAIL(1)                      StGit Manual                      STG-MAIL(1)
2
3
4

NAME

6       stg-mail - Send a patch or series of patches by e-mail
7

SYNOPSIS

9       stg mail  [options] [--] [<patch1>] [<patch2>] [<patch3>..<patch4>]
10

DESCRIPTION

12       Send a patch or a range of patches by e-mail using the SMTP server
13       specified by the stgit.smtpserver configuration option, or the
14       --smtp-server command line option. This option can also be an absolute
15       path to sendmail followed by command line arguments.
16
17       The From address and the e-mail format are generated from the template
18       file passed as argument to --template (defaulting to
19       .git/patchmail.tmpl or ~/.stgit/templates/patchmail.tmpl or
20       /usr/share/stgit/templates/patchmail.tmpl). A patch can be sent as
21       attachment using the --attach option in which case the mailattch.tmpl
22       template will be used instead of patchmail.tmpl.
23
24       The To/Cc/Bcc addresses can either be added to the template file or
25       passed via the corresponding command line options. They can be e-mail
26       addresses or aliases which are automatically expanded to the values
27       stored in the [mail "alias"] section of GIT configuration files.
28
29       A preamble e-mail can be sent using the --cover and/or --edit-cover
30       options. The first allows the user to specify a file to be used as a
31       template. The latter option will invoke the editor on the specified
32       file (defaulting to .git/covermail.tmpl or
33       ~/.stgit/templates/covermail.tmpl or
34       /usr/share/stgit/templates/covermail.tmpl).
35
36       All the subsequent e-mails appear as replies to the first e-mail sent
37       (either the preamble or the first patch). E-mails can be seen as
38       replies to a different e-mail by using the --in-reply-to option.
39
40       SMTP authentication is also possible with --smtp-user and
41       --smtp-password options, also available as configuration settings:
42       smtpuser and smtppassword. TLS encryption can be enabled by --smtp-tls
43       option and smtptls setting.
44
45       The following variables are accepted by both the preamble and the patch
46       e-mail templates:
47
48
49           %(diffstat)s     - diff statistics
50           %(number)s       - empty if only one patch is sent or 'patchnr/totalnr'
51           %(snumber)s      - stripped version of '%(number)s'
52           %(nspace)s       - ' ' if %(number)s is non-empty, otherwise empty string
53           %(patchnr)s      - patch number
54           %(sender)s       - 'sender'  or 'authname <authemail>' as per the config file
55           %(totalnr)s      - total number of patches to be sent
56           %(version)s      - 'version' string passed on the command line (or empty)
57           %(vspace)s       - ' ' if %(version)s is non-empty, otherwise empty string
58
59       In addition to the common variables, the preamble e-mail template
60       accepts the following:
61
62
63           %(shortlog)s     - first line of each patch description, listed by author
64
65       In addition to the common variables, the patch e-mail template accepts
66       the following:
67
68
69           %(authdate)s     - patch creation date
70           %(authemail)s    - author's email
71           %(authname)s     - author's name
72           %(commemail)s    - committer's e-mail
73           %(commname)s     - committer's name
74           %(diff)s         - unified diff of the patch
75           %(fromauth)s     - 'From: author\n\n' if different from sender
76           %(longdescr)s    - the rest of the patch description, after the first line
77           %(patch)s        - patch name
78           %(prefix)s       - 'prefix' string passed on the command line
79           %(pspace)s       - ' ' if %(prefix)s is non-empty, otherwise empty string
80           %(shortdescr)s   - the first line of the patch description
81

OPTIONS

83       -a, --all
84           E-mail all the applied patches.
85
86       --to TO
87           Add TO to the To: list.
88
89       --cc CC
90           Add CC to the Cc: list.
91
92       --bcc BCC
93           Add BCC to the Bcc: list.
94
95       --auto
96           Automatically cc the patch signers.
97
98       --no-thread
99           Do not send subsequent messages as replies.
100
101       --unrelated
102           Send patches without sequence numbering.
103
104       --attach
105           Send a patch as attachment.
106
107       --attach-inline
108           Send a patch inline and as an attachment.
109
110       -v VERSION, --version VERSION
111           Add VERSION to the [PATCH ...] prefix.
112
113       --prefix PREFIX
114           Add PREFIX to the [... PATCH ...] prefix.
115
116       -t FILE, --template FILE
117           Use FILE as the message template.
118
119       -c FILE, --cover FILE
120           Send FILE as the cover message.
121
122       -e, --edit-cover
123           Edit the cover message before sending.
124
125       -E, --edit-patches
126           Edit each patch before sending.
127
128       -s SECONDS, --sleep SECONDS
129           Sleep for SECONDS between e-mails sending.
130
131       --in-reply-to REFID
132           Use REFID as the reference id.
133
134       --smtp-server HOST[:PORT] or "/path/to/sendmail -t -i"
135           SMTP server or command to use for sending mail.
136
137       -u USER, --smtp-user USER
138           Username for SMTP authentication.
139
140       -p PASSWORD, --smtp-password PASSWORD
141           Password for SMTP authentication.
142
143       -T, --smtp-tls
144           Use SMTP with TLS encryption.
145
146       -b BRANCH, --branch BRANCH
147           Use BRANCH instead of the default branch.
148
149       -m, --mbox
150           Generate an mbox file instead of sending.
151
152       --git
153           Use git send-email (EXPERIMENTAL).
154
155       -O OPTIONS, --diff-opts OPTIONS
156           Extra options to pass to "git diff".
157

STGIT

159       Part of the StGit suite - see stg(1)
160
161
162
163
164StGit                             02/03/2019                       STG-MAIL(1)
Impressum