table of contents
- Tumbleweed 1.2.0+20251025-1.1
- Leap-16.0
- Leap-15.6
| XDG-EMAIL(1) | xdg-email Manual | XDG-EMAIL(1) |
NAME¶
xdg-email - command line tool for sending mail using the user's preferred e-mail composer
SYNOPSIS¶
xdg-email [--utf8] [--cc address] [--bcc address] [--subject text] [--body text] [--attach file] [mailto-uri | address(es)]
xdg-email {--help | --manual | --version}
DESCRIPTION¶
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.
Do not use xdg-email as the default handler for mailto: links. Its main purpose is to assemble mailto: links and hand them over to a capable program (usually the defult handler for mailto: links.
xdg-email is for use inside a desktop session only. It is not recommended to use xdg-email as root.
OPTIONS¶
--utf8
--cc address
--bcc address
--subject text
--body text
--attach file
Some e-mail applications require the file to remain present after xdg-email returns.
The attach option currently is only implemented for Thunderbird and Icedove on Gnome, Cinnamon, Lxde, Mate, Deepin, KDE, Lxqt and generic desktops with thunderbird as the mailclient or through a custom xdg-email-hook.sh. It will not work with the MAILER environment variable.
--help
--manual
--version
ENVIRONMENT VARIABLES¶
xdg-email honours the following environment variables:
XDG_UTILS_DEBUG_LEVEL
MAILER
The set command will be run with the URI appended as the last argument.
The MAILER is not standardized, keep the command as simple as possible.
HOOK SCRIPT¶
If a xdg-email-hook.sh command is present, it will be used as the opener.
It is called with the URL as it's first argument: xdg-email-hook.sh mailto_URL
If an attachment is specified it will be called with an additional --attach-files option followed by a list of one or more URI-encoded, comma seperated filepaths. (This is compatible with the thunderbird -compose option)
Like this: xdg-email-hook.sh mailto_URL --attach-files file-list
EXIT CODES¶
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
SEE ALSO¶
xdg-open(1), xdg-mime(1), xdg-utils-common(7), MIME applications associations specification[1], RFC 6068 - The 'mailto' URI Scheme[2]
EXAMPLES¶
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'
AUTHORS¶
Kevin Krammer
Jeremy White
COPYRIGHT¶
Copyright © 2006
NOTES¶
- 1.
- MIME applications associations specification
- 2.
- RFC 6068 - The 'mailto' URI Scheme
| 03/11/2026 | xdg-utils 1.0 |