The characteristic of Linux system is that any operation can be implemented by commands. Linux system can also send mail by command. This article will introduce how the Linux system sends mail?
can send and receive mail using the mail command syntax is as follows:
$ mail [-s subject] [-c cc-addr] [-b bcc-addr] to- Addr
The meaning of each option is as follows:
Option Description
-s The message header.
-c For users to send, multiple users are separated by a comma (,).
-b For users who need to send secrets (bcc), multiple users are separated by commas (,).
For example, send an email to [email protected]:
$mail -s “Test Message” [email protected]
Hello everyone,
this is Linux tutorial and url is http://see.xidian.edu.cn/cpp/linux/.
Cc:
The first line is the command to enter, -s is the subject of the message, and the [email protected] is the recipient of the message. The car will enter the body of the mail, you can enter any text, such as the two lines above. After inputting the body of the email, you need to press CTRL+D to end the input. At this point, you will be prompted to enter the Cc address, which is the email copy address. The email is sent without a direct carriage return.
You can also send the file via the redirection operator:
$mail -s “Report 05/06/07” [email protected] demo.txt
With the above command, you can send the contents of the demol.txt file to [email protected] as the content of the email.
No parameters are required to receive mail:
$mail
no email
The above is the introduction of the Linux system to send mail, of course you You can log in to the mailbox to send mail in the browser, but as long as you are familiar with using the command to send mail, it is actually more convenient.
In Ubuntu 12.04 system, there is sometimes a shortage of space in the /boot space,
Among the many commands of Linux system, rm command is mainly used to delete files. The following sm
When Linux backs up the ifcfg-eth0 configuration file, the network fails and the network card cannot
Many users in the Linux system are exposed to shorter commands, and hadoop dfs commands are more dif
How to use AWK regular expressions under Linux system
How to configure LILO file for Red Flag Linux system
RHEL6 changes the name of the asm disk by udev.
How to solve the Linux account expiration?
How Ubuntu implements screen-to-cut
What should I do if the Linux system inittab file is lost?
Steps to Mount an LVM Partition on a Linux System
Ubuntu 12.04 system boot space is insufficient to delete the old kernel
How to modify the color of the Linux system shell script output text
How to put the files deleted by the Linux rm command into the garbage bin
Win10 will improve support for high-resolution displays such as 4K.
Win7 system desktop right-click menu pops up very slow how to do
Computer xp system installation tutorial - Step 12: Backup system (1)
Play Win8.1 screen! Tips for Layout Perfect Tiles
Win2000/2003 delete the default shared method
Win10 10537 preview version of the map tour dynamic demo window effects
How to solve the slow shutdown speed of Win7 computer?
Win7 computer can not save the printer settings, prompt error 0x000006d9 how to do?
Win7 computer error oxc0000409 prompts how to do
How to solve the problem that Win7 computer always pops up the dial-up connection automatically?