Email is extremely handy with mutt, with just one command to send or bulk mail
Function Description: E-mail Management program.
Syntax: Mutt [-hnprvxz][-a< file >][-b< address >][-c< address >][-f< mail file >][-F< profile >][-H< Mail Draft >][-i < file >][-m< type >][-s< subject >][email address]
Added: Mutt is a text-mode mail management program that provides a full screen operation interface.
Parameters
-a< File > Add additional files to the message.
-b< address > Specify the recipient address of the blind copy.
-c< address > Designated copy of the delivery address.
-f< mail File > Specify the message file to load.
-f< configuration File > Specify the settings file for Mutt program without reading the preset. muttrc file.
-h displays Help.
-h< Mail Draft > Send a draft of the specified message.
-i< File > Inserts the specified file into the message text.
-m< type > Specify the default mail mailbox type.
-N Do not read the program planting file (/ETC/MUTTRC).
-p After you finish editing the message in Mutt and don't want to send the message immediately, you can send the message in a reprieve.
-R opens the mail file in a read-only manner.
-s< topic > Specify the subject of the message.
-V Displays the version information for Mutt and the parameters given when the file was compiled.
-X simulates the way Mailx is edited.
-Z with the-f parameter, if there is no mail in the message file will not start mutt.
1. Installation method
Debian Installation #
apt-get install -y mutt
CentOS Installation #
yum install -y mutt
2. How to use
The simplest method of testing
echo "Test" | mutt -s "Title" [email protected]
With accessories.
echo "Test" | mutt -s "mysql backup" -a /mysql.tar.gz [email protected]
Read the information in the text as content
mutt -s "Test" [email protected]
Add multiple Attachments
echo "Test" | mutt -s "web backup" -a /mysql.tar.gz -a /web.tar.gz [email protected]
-S "mysql backup" message parameters and title
-a/mysql.tar.gz parameters and paths for sending attachments
Read Mail.txt content for the message content, content must be UTF8 encoded, otherwise garbled
3. Set the sender
Editing a configuration file
vi /etc/Muttrc
Add the following to prevent it from being used as junk e-mail
set from="[email protected]"
set use_from=yes
set envelope_from="yes"
set realname="mutt"
[Email protected] is the sending address
Mutt for Sender
Sending a message is slightly slower and requires waiting a minute or longer to send a successful (scheduled backup)
Reprint Please specify: Notes»linux use mutt Send mail/attachment
Come from:http://www.isucc.me/129.html
Linux uses Mutt to send mail/attachments