How to use Linux to send mail

  
 

Do you know what a Linux system is? Some users don't know much about Linux. Linux is a free and free operation system. Any operation can be implemented by commands. You know that Linux can also use commands to send emails. Then Linux system sends emails. How to operate it, come and see it with Xiaobian.

To use commands to send and receive files, you must understand the syntax. The following is a description of the syntax:

$mail [-s subject] [-c cc-addr] [ ,null,null,3],-b bcc-addr] to-addr

-s is the message header.

-c refers to the user to be sent, and how many users can be separated by a comma (,).

For users who need to send secrets (bcc) at -b, users with secrets can also be separated by commas (,).

Let's make it clearer. Please see the example below, 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 entered, where -s is the subject of the message, and [email protected] is the recipient. After completing the command, press Enter to enter the body. After the body of the email is completed, you need to press CTRL+D to end the input, and then enter the Cc address to send the address. The mail is sent without direct carriage return.

No parameters are required to receive mail:

$mail

no email

Is it a good idea to send emails to Linux systems? Now, as long as we are familiar with the command to send mail, it is very simple. If you are interested in sending emails to Linux system, please follow the above method.

Copyright © Windows knowledge All Rights Reserved