Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to use the mail command in Centos

Shulou Source: shulou.com Published: 2022-06-01 19:07:15 10月02日 Update

This article mainly introduces how to use the mail command in Centos. It is very detailed and has a certain reference value. Friends who are interested must finish it!

Basic syntax of 1.mail

H | headers displays the current mailing list

L | list displays a list of currently supported commands

| help displays the usage of multiple command parameters for viewing mailing lists

D delete the current message, move the pointer down. D 1-100 Delete 1st to 100th messages

T | type | more | p | page num reads an email

N | next | {nothing} read the next email where the current pointer is located. When reading, press the space bar to turn the page, and press enter to move down one line.

N | next | {nothing} num read an email

F | from num view headers

Top displays the header of the message in which the current pointer is located

File | folder displays the entire user's mail storage path and number of messages

Mail letter email editor press the Ctrl+D key or. Key to end the text

Q exit

two。 E-mail storage location:

/ var/spool/mail/username

3. There are three ways to send mail:

1)。 Standard input email content:

Mail-s "title" username@domain.c

Press the Ctrl+D key or. Key to end the text

2)。 Pipeline mode

Echo "mail content" | mail-s "title" username@domain.ccat somefile | mail-s "title" username@domain.c

3)。 File redirection mode

Mail-s "title" username@domain.c < file is all the contents of this article "how to use mail commands in Centos". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Email command content pointer method body that is location article mailing list line number value location interest parameters enter keys multiple boys buddies Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Apple Shulou Tech Info MySQL vpn