XDG-EMAIL(1)
β¨ XDG-EMAIL(1) β the xdg-email situation π
okay so bestie, welcome to the xdg-email manual page π this lives in the xdg-email Manual, and honestly? it's giving "let me open your fave email composer for you" energy. sit down, grab a strawberry π, and let's get into it.
πΈ NAME πΈ
xdg-email β a command line tool for sending mail using the user's preferred e-mail composer. no cap, that's literally the whole vibe. π
π SYNOPSIS π
xdg-email [--utf8] [--cc address] [--bcc address] [--subject text]
[--body text] [--attach file] [mailto-uri | address(es)]
xdg-email {--help | --manual | --version}
π DESCRIPTION π
So xdg-email opens up the user's preferred e-mail composer so you can send a mail to address(es) or a mailto-uri. And yes, RFC2368 is the one that defines mailto: URIs, so if you were wondering β that's the source, iykyk.
Here's the tea tho: xdg-email only supports the cc, subject and body fields inside a mailto-uri. Every other field? silently ignored. Not a crash, not a warning, justβ¦ ignored. ghosted. π
Also important: address(es) must follow the syntax of RFC822. And yes you can drop multiple addresses as separate arguments β she's flexible like that. π¦
Everything you put on the command line gets used to prefill the matching fields in the user's e-mail composer. And the user still gets to change any of it before actually sending, so nothing is locked in. main character gets final say. β¨
Heads up bestie:xdg-emailis for use inside a desktop session only. And it is not recommended to usexdg-emailas root β please don't, that's not the move. π
π OPTIONS π
--utf8β says that all the command line options that follow are in utf8. Without it, command line options are expected to be encoded according to locale. If the locale already specifies utf8, this option has no effect (it's just chilling). Also, this option does not affect mailto URIs passed on the command line β those are their own thing.--cc addressβ specify a recipient to be copied on the e-mail. the cc girlies stay winning. π--bcc addressβ specify a recipient to be blindly copied on the e-mail. sneaky, discreet, iconic. π€«--subject textβ specify a subject for the e-mail. make it good.--body textβ specify a body for the e-mail. since the user can still make changes before actually sending, this is basically a way to hand them a template. and yes, text may contain linebreaks β go off. π--attach fileβ specify an attachment for the e-mail. file must point to an existing file, okay? no imaginary files. π
Real talk: some e-mail applications require the file to remain present after xdg-email returns. so don't go deleting it immediately and then act surprised. π
--helpβ show command synopsis.--manualβ show this manual page. (hi, you're here π)--versionβ show the xdg-utils version information.
π ENVIRONMENT VARIABLES π
xdg-email honours the following environment variables:
XDG_UTILS_DEBUG_LEVELβ set this env var to a non-zero numerical value andxdg-emailstarts doing more verbose reporting onstderr. set it higher and the verbosity goes up even more. basically a gossip dial. π£οΈ
π₯ EXIT CODES π₯
An exit code of 0 means success, while a non-zero exit code means failure. The following failure codes can be returned:
- Error in command line syntax.
- One of the files passed on the command line did not exist.
- A required tool could not be found.
- The action failed.
- No permission to read one of the files passed on the command line.
π¦ SEE ALSO π¦
xdg-open(1)xdg-mime(1)- 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 β Author.
- Jeremy White β Author.
π COPYRIGHT π
Copyright Β© 2006
β NOTES β
- MIME applications associations specification
http://www.freedesktop.org/wiki/Specifications/mime-apps-spec/ - RFC 6068 - The 'mailto' URI Scheme
https://tools.ietf.org/html/rfc6068
and that's the whole page, bestie π«Ά this was from xdg-utils 1.0, dated 12/06/2025. slay, go send an email, you've got this πβ¨π
π¦ where this page comes from
- arch rolling: xdg-utils 1.2.1-2 Β· MIT
- ubuntu resolute: xdg-utils 1.2.1-2ubuntu2 Β· MIT
- ubuntu stonking: xdg-utils 1.2.1-2ubuntu2 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms