+usage = """%prog [options] [<patch1>] [<patch2>] [<patch3>..<patch4>]
+
+Send a patch or a range of patches by e-mail using the 'smtpserver'
+configuration option. The From address and the e-mail format are
+generated from the template file passed as argument to '--template'
+(defaulting to '.git/patchmail.tmpl' or
+'~/.stgit/templates/patchmail.tmpl' or or
+'/usr/share/stgit/templates/patchmail.tmpl'). The To/Cc/Bcc addresses
+can either be added to the template file or passed via the
+corresponding command line options.
+
+A preamble e-mail can be sent using the '--cover' and/or
+'--edit-cover' 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 '.git/covermail.tmpl' or
+'~/.stgit/templates/covermail.tmpl' or
+'/usr/share/stgit/templates/covermail.tmpl').
+
+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 '--refid' option.
+
+SMTP authentication is also possible with '--smtp-user' and
+'--smtp-password' options, also available as configuration settings:
+'smtpuser' and 'smtppassword'.
+
+The template e-mail headers and body must be separated by
+'%(endofheaders)s' variable, which is replaced by StGIT with
+additional headers and a blank line. The patch e-mail template accepts
+the following variables:
+
+ %(patch)s - patch name
+ %(maintainer)s - 'authname <authemail>' as read from the config file
+ %(shortdescr)s - the first line of the patch description
+ %(longdescr)s - the rest of the patch description, after the first line
+ %(endofheaders)s - delimiter between e-mail headers and body
+ %(diff)s - unified diff of the patch
+ %(diffstat)s - diff statistics
+ %(date)s - current date/time
+ %(version)s - ' version' string passed on the command line (or empty)
+ %(prefix)s - 'prefix ' string passed on the command line
+ %(patchnr)s - patch number
+ %(totalnr)s - total number of patches to be sent
+ %(number)s - empty if only one patch is sent or ' patchnr/totalnr'
+ %(authname)s - author's name
+ %(authemail)s - author's email
+ %(authdate)s - patch creation date
+ %(commname)s - committer's name
+ %(commemail)s - committer's e-mail
+
+For the preamble e-mail template, only the %(maintainer)s, %(date)s,
+%(endofheaders)s, %(version)s, %(patchnr)s, %(totalnr)s and %(number)s
+variables are supported."""