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-email is for use inside a desktop session only. And it is not recommended to use xdg-email as 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 and xdg-email starts doing more verbose reporting on stderr. 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:

  1. Error in command line syntax.
  2. One of the files passed on the command line did not exist.
  3. A required tool could not be found.
  4. The action failed.
  5. No permission to read one of the files passed on the command line.

πŸ¦‹ SEE ALSO πŸ¦‹


πŸŽ€ 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 Β© 2006


⭐ NOTES ⭐

  1. MIME applications associations specification http://www.freedesktop.org/wiki/Specifications/mime-apps-spec/
  2. 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