1STG-MAIL(1) StGit Manual STG-MAIL(1)
2
3
4
6 stg-mail - Send a patch or series of patches by e-mail
7
9 stg mail [options] [--] [<patch1>] [<patch2>] [<patch3>..<patch4>]
10
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 %(diffstat)s - diff statistics
49 %(number)s - empty if only one patch is sent or 'patchnr/totalnr'
50 %(snumber)s - stripped version of '%(number)s'
51 %(nspace)s - ' ' if %(number)s is non-empty, otherwise empty string
52 %(patchnr)s - patch number
53 %(sender)s - 'sender' or 'authname <authemail>' as per the config file
54 %(totalnr)s - total number of patches to be sent
55 %(version)s - 'version' string passed on the command line (or empty)
56 %(vspace)s - ' ' if %(version)s is non-empty, otherwise empty string
57
58 In addition to the common variables, the preamble e-mail template
59 accepts the following:
60
61 %(shortlog)s - first line of each patch description, listed by author
62
63 In addition to the common variables, the patch e-mail template accepts
64 the following:
65
66 %(authdate)s - patch creation date
67 %(authemail)s - author's email
68 %(authname)s - author's name
69 %(commemail)s - committer's e-mail
70 %(commname)s - committer's name
71 %(diff)s - unified diff of the patch
72 %(fromauth)s - 'From: author\n\n' if different from sender
73 %(longdescr)s - the rest of the patch description, after the first line
74 %(patch)s - patch name
75 %(prefix)s - 'prefix' string passed on the command line
76 %(pspace)s - ' ' if %(prefix)s is non-empty, otherwise empty string
77 %(shortdescr)s - the first line of the patch description
78
80 -a, --all
81 E-mail all the applied patches.
82
83 --to TO
84 Add TO to the To: list.
85
86 --cc CC
87 Add CC to the Cc: list.
88
89 --bcc BCC
90 Add BCC to the Bcc: list.
91
92 --auto
93 Automatically cc the patch signers.
94
95 --no-thread
96 Do not send subsequent messages as replies.
97
98 --unrelated
99 Send patches without sequence numbering.
100
101 --attach
102 Send a patch as attachment.
103
104 --attach-inline
105 Send a patch inline and as an attachment.
106
107 -v VERSION, --version VERSION
108 Add VERSION to the [PATCH ...] prefix.
109
110 --prefix PREFIX
111 Add PREFIX to the [... PATCH ...] prefix.
112
113 -t FILE, --template FILE
114 Use FILE as the message template.
115
116 -c FILE, --cover FILE
117 Send FILE as the cover message.
118
119 -e, --edit-cover
120 Edit the cover message before sending.
121
122 -E, --edit-patches
123 Edit each patch before sending.
124
125 -s SECONDS, --sleep SECONDS
126 Sleep for SECONDS between e-mails sending.
127
128 --in-reply-to REFID
129 Use REFID as the reference id.
130
131 --smtp-server HOST[:PORT] or "/path/to/sendmail -t -i"
132 SMTP server or command to use for sending mail.
133
134 -u USER, --smtp-user USER
135 Username for SMTP authentication.
136
137 -p PASSWORD, --smtp-password PASSWORD
138 Password for SMTP authentication.
139
140 -T, --smtp-tls
141 Use SMTP with TLS encryption.
142
143 -b BRANCH, --branch BRANCH
144 Use BRANCH instead of the default branch.
145
146 -m, --mbox
147 Generate an mbox file instead of sending.
148
149 --domain DOMAIN
150 Use DOMAIN when generating message IDs (instead of the system
151 hostname).
152
153 --git
154 Use git send-email (EXPERIMENTAL).
155
156 -O OPTIONS, --diff-opts OPTIONS
157 Extra options to pass to "git diff".
158
160 Part of the StGit suite - see stg(1)
161
162
163
164StGit 1.1 07/23/2021 STG-MAIL(1)