xdg-email — command line tool for sending mail using the user's preferred e-mail composer
xdg-email
[--utf8
] [--cc
address
] [--bcc
address
] [--subject
text
] [--body
text
] [--attach
file
] [ mailto-uri
| address(es)
]
xdg-email
{ --help
| --manual
| --version
}
xdg-email opens the user's preferred e-mail composer in order to send
a mail to address(es)
or
mailto-uri
. RFC2368 defines mailto:
URIs. xdg-email limits support to, cc, subject and body fields in
mailto-uri
, all other fields are silently
ignored. address(es)
must follow the
syntax of RFC822. Multiple addresses may be provided as
separate arguments.
All information provided on the command line is used to prefill corresponding fields in the user's e-mail composer. The user will have the opportunity to change any of this information before actually sending the e-mail.
xdg-email is for use inside a desktop session only. It is not recommended to use xdg-email as root.
--utf8
--cc
address
--bcc
address
--subject
text
--body
text
text
may contain linebreaks.
--attach
file
Specify an attachment for the e-mail. file
must point to an existing file.
Some e-mail applications require the file to remain present after xdg-email returns.
--help
--manual
--version
xdg-email honours the following environment variables:
An exit code of 0 indicates success while a non-zero exit code indicates failure. The following failure codes can be returned:
1
2
3
4
5
xdg-open(1), xdg-mime(1), MIME applications associations specification, RFC 6068 - The 'mailto' URI Scheme
xdg-email 'Jeremy White <jwhite@example.com>'
xdg-email --attach /tmp/logo.png \ --subject 'Logo contest' \ --body 'Attached you find the logo for the contest.' \ 'jwhite@example.com'
xdg-email --subject 'Your password is about to expire' \ 'jwhite@example.com' 'bastian@example.com' 'whipple@example.com'