In linux, the command line mail method 1. the simplest method is: mail-s text ** @ mail.ustc.edu.cn. The result of this command is to send an empty message titled text to the mailbox, however, this type of mail is often treated as spam. If you do not receive the mail, you are advised to open the recycle bin to check it. first, you can use the current shell as an editor. After the content is edited, press Ctrl-D. 2. Practical mail sending method. # Method 2: Use the pipeline command echo "This is a test mail !" | Mail-s text ** @ mail.ustc.edu.cn # Use redirection. Mail-s test ** @ mail.ustc.edu.cn <file sends a mail based on the file content. First, choose to write a document in advance and then mail it. 3. Email sending with attachments (important) if your system does not have the uencode command, you must first install sharutils and sudo apt-get install sharutils. Uuencode requires two parameters. The first one is the file you want to send. Of course, this can also be done using pipelines. The second one is the displayed file name uuencode/home/daniel/httpd. conf httpd. conf | mail-s mailtest ** @ mail.ustc.edu.cn