Use the mail command in Centos

Source: Internet
Author: User
1. mail basic syntax h | headers displays the current mail list l | list displays the list of currently supported commands? | Help: display multiple command parameters for viewing the mail list. usage d: delete the current mail, pointer, and move down. D1

1. basic mail syntax

H | headers: displays the current mail list
L | list displays the list of currently supported commands
? | Help command parameter usage for displaying multiple mail lists
D. delete the current email, and move the pointer down. D 1-100 delete 1st to 100 emails
T | type | more | p | page num read an email
N | next | {Do not fill in anything} read the content of the next email containing the current pointer. when reading, press the space key to flip the page, and press the Enter key to move the line down.
N | next | {Do not fill in anything} num reads an email
F | from num view the mail header
Top displays the mail header of the email with the current pointer
File | folder: displays the entire user mail storage path and number of mails
After the email is edited, press Ctrl + D or.
Q exit


2. mail storage location:
/Var/spool/mail/username


3. three email sending methods:


1. standard input email content:
Mail-s "title" username@domain.c
Press Ctrl + D or. to end the body

2. MPs queue mode
Echo "mail content" | mail-s "title" username@domain.c
Cat somefile | mail-s "title" username@domain.c

3. file redirection
Mail-s "title" username@domain.c <file
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.