Linux mail command is often used by system administrators. It is a very practical command. You can send memos to remind system users regularly. The following small series will give you a detailed introduction to the mail command in Linux.
to see the mail by the first parameter help all the parameters as follows:
code is as follows:
Usage: mail [-BDFintv ~] [-s subject] [ -a attachment ] [-c cc-addr] [-b bcc-addr]
[-r from-addr] [-h hops] [-A account] [-R reply-addr] to- Addr …
mail [-BDeHiInNRv~] [-T name] [-A account] -f [name]
mail [-BDeinNRv~] [-A account] [-u User]
1. Send the title plus text content
Run the command:
The code is as follows:
mail -s “this is a title” bbmonkey62 @163.com
Enter, continue to enter text, that is, the content of the message
The code is as follows:
this is content
Then press Ctrl+D drop out.
The code is as follows:
EOT
The above is the simplest example, what if we want to send to multiple mailboxes? Add another email address after the above mailbox, separated by spaces, as follows:
The code is as follows:
mail -s “this is a title” bbmonkey62@163 .com [email protected]
In the above example, the sender is the current login user name of Linux. For example, if the user I am currently logged in as admin, the email address sent is admin@163. Com, if the mailbox suffix domain name is 163.com. But sometimes we want to write the sender's name, and we don't want to use the default email address. We can do this:
The code is as follows:
mail -s “this is a title” -r “[email protected]” [email protected]
At this time, the sender's mailbox becomes [email protected], some spam is used in this way, hidden Your own real email address.
If we want the recipient to reply to the email, the email address of the reply is different from our email address, then we can customize the email address as follows:
The code is as follows: Br>
mail -s “this is a title” -r “[email protected]” -R “[email protected]” [email protected]
Then the recipient responds By default, it will be sent to [email protected] instead of the default [email protected].
2, send attachments
Sometimes we need to send attachments, it is also very easy, as follows:
Code is as follows:
mail -s “ This is a title” -r “[email protected]” -a “/home/hadoop/report/3.txt” [email protected]
Previous12Next Total 2 Pages
Oracle is one of the databases used by many developers. There are also many process
The order of the connector ld link in Linux system is very important. If the order is not correct, i
When the VMware virtual machine starts the Ubuntu system, there is saned disabled;
Among the many commands in Linux system, some commands are less commonly used, such as the isosize c
How to bind multiple network cards to one under Linux?
How to solve the problems encountered when Unix migration to Linux system training
Linux system reconfig command instructions
How to delete the specified file in swap
Ubuntu system to enable Soft AP method
Linux setitimer function operation skills
How to solve the problem of Linux system Swap exhaustion
The difference between Apache and Tomcat in Linux system is
Ubuntu replaces the Firefox version of the method
Linux to see if the system is attacked by cc
How to use dd command in Linux system
Summary of methods for modifying debian wheezy default configuration under Linux
Win8.1 finally supports Alipay! No need for international credit card
Windows 7SP1 message disclosure will bring many improvements
Windows 7 pre-installation precautions and recommendations for use
Microsoft pushes Windows 10 but 15 years old Windows XP refuses to die
Win10 system disables the method of discrete graphics
How to use Finaldata under XP system
Win8 IE10 Flash content can not be opened how to do
Win10 Build 10108 version screenshots tour: UI new improvements
Linux dual network card dual gateway settings for different IP segments