command line tool for sending mail using the user (Aqs preferred e -mail composer


' xdg-email 'u xdg-email [ --utf8 ][ --cc address ][ --bcc address ][ --subject text ][ --body text ][ --attach file ][ mailto-uri | address(es) ] ' xdg-email 'u xdg-email { --help | --manual | --version }


xdg -email opens the user (Aqs 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 (Aqs 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 Indicates that all command line options that follow are in utf8 . Without this option, command line options are expected to be encoded according to locale . If the locale already specifies utf8 this option has no effect . This option does not affect mailto URIs that are passed on the command line .

--cc address Specify a recipient to be copied on the e -mail .

--bcc address Specify a recipient to be blindly copied on the e -mail .

--subject text Specify a subject for the e -mail .

--body text Specify a body for the e -mail . Since the user will be able to make changes before actually sending the e -mail, this can be used to provide the user with a template for the e -mail . 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 Show command synopsis .

--manual Show this manual page .

--version Show the xdg -utils version information .


xdg -email honours the following environment variables:

XDG_UTILS_DEBUG_LEVEL Setting this environment variable to a non -zero numerical value makes xdg -email do more verbose reporting on stderr . Setting a higher value increases the verbosity .


An exit code of 0 indicates success while a non -zero exit code indicates 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 .


.RS 4
xdg -email (AqJeremy White <jwhite@example .com> (Aq .RE

.RS 4
xdg -email --attach /tmp/logo .png \ --subject (AqLogo contest (Aq \ --body (AqAttached you find the logo for the contest . (Aq \ (Aqjwhite@example .com (Aq .RE

.RS 4
xdg -email --subject (AqYour password is about to expire (Aq \ (Aqjwhite@example .com (Aq (Aqbastian@example .com (Aq (Aqwhipple@example .com (Aq .RE


KevinKrammer Author.

JeremyWhite Author.


Copyright 2006


" 1." 4 MIME applications associations specification http://www.freedesktop.org/wiki/Specifications/mime-apps-spec/

" 2." 4 RFC 6068 - The 'mailto' URI Scheme https://tools.ietf.org/html/rfc6068


xdg-open(1), xdg-mime(1), MIMEapplications associations specification [1] , RFC6068 -The (Aqmailto (Aq URI Scheme [2]

Copied to clipboard
free 100$ digital ocean credit