Linux Command Library
commands
Commands
basic
Basic
tips
Tips

mailx

process mail messages

- Send mail (the content should be typed after the command, and ended with `Ctrl+D`):
mailx -s "[subject]" [to_addr]

- Send mail with content passed from another command:
echo "[content]" | mailx -s "[subject]" [to_addr]

- Send mail with content read from a file:
mailx -s "[subject]" [to_addr] < [content.txt]

- Send mail to a recipient and CC to another address:
mailx -s "[subject]" -c [cc_addr] [to_addr]

- Send mail specifying the sender address:
mailx -s "[subject]" -r [from_addr] [to_addr]

- Send mail with an attachment:
mailx -a [file] -s "[subject]" [to_addr]

mail.mailutils [,OPTION/...] [,address/...] mail.mailutils [,OPTION/...] [,OPTION/...] [,file/] mail.mailutils [,OPTION/...] ,--file /[,OPTION/...] [,file/] mail.mailutils [,OPTION/...] ,--file=file /[,OPTION/...]

GNU mail -- process mail messages. If -f or --file is given, mail operates on the mailbox named by the first argument, or the user's mbox, if no argument given.

-A, --attach=,FILE/
attach FILE
-a, --append=,HEADER/: VALUE append given header to the message being sent
--content-type=,TYPE/
set content type for subsequent --attach options
-E, --exec=,COMMAND/
execute COMMAND
-e, --exist
return true if mail exists
--encoding=,NAME/
set encoding for subsequent --attach options
-F, --byname
save messages according to sender
-H, --headers
write a header summary and exit
-i, --ignore
ignore interrupts
-N, --nosum
do not display initial header summary
-n, --norc
do not read the system mailrc file
-p, --print, --read
print all mail to standard output
-q, --quit
cause interrupts to terminate program
-r, --return-address=,ADDRESS/
use address as the return address when sending mail
-s, --subject=,SUBJ/
send a message with the given SUBJECT
-t, --to
read recipients from the message header
-u, --user=,USER/
operate on USER's mailbox
Global debugging settings
--debug-level=,LEVEL/
set Mailutils debugging level
--debug-line-info
show source info with debugging messages
Configuration handling
--config-file=,FILE/
load this configuration file; implies --no-config
--config-lint
check configuration file syntax and exit
--config-verbose
verbosely log parsing of the configuration files
--no-config
do not load site and user configuration files
--no-site-config
do not load site-wide configuration file
--no-user-config
do not load user configuration file
--set=,PARAM=VALUE/
set configuration parameter
Informational options
--config-help
show configuration file summary
--show-config-options
show compilation options
-?, --help
give this help list
--usage
give a short usage message
-V, --version
print program version

Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options.

Report bugs to <bug-mailutils@gnu.org>. GNU Mailutils home page: <http://mailutils.org> General help using GNU software: <http://www.gnu.org/gethelp/>

Copyright © 2007-2016 Free Software Foundation, inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

The complete GNU mailutils documentation is maintained as a Texinfo manual. If the mailutils-doc package is installed, the command

info mailutils

should give you access to the complete manual. You can also find this manual online in the GNU mailutils webpage: http://www.gnu.org/software/mailutils/manual/index.html. Please note this manpage was automatically generated by the Debian mailutils packagers. Do not file bugs for its content to the GNU Mailutils upstream authors.

play store download app store download
Imprint
Sonnenallee 29, 12047 Berlin, Germany
e-mail: sschubert89@gmail.com

Privacy policy
Successfully copied