"mail" is a command to send and receive mail in Unix, Linux and BSD operating system. To initiate a mail sending process, just type in the following command:
mail recipient@domain.com
Replace recipient@domain.com with a valid email address.
The system will prompt for a subject of the email before allowing user to type in the mail message body.
Tip: If the sender and recipient is on the same system, it’s possible to omit the domain (@domain.com) part of the address, leaving only user name.
It’s also possible to use mail’s arguments or switches to directly send mail without interactive input. For example,
mail -s Test address@domain.com < /dev/null
Command above will immediately send a blank email with empty body to the recipient address with the subject "Test". For more arguments, type "man mail".
HappY SurfinG!!!;-)
mail recipient@domain.com
Replace recipient@domain.com with a valid email address.
The system will prompt for a subject of the email before allowing user to type in the mail message body.
# mail receipent@domain.comOnce finished typing the email message, press Ctrl-D (shown as ^D in example above), which represents End of Text (EOT). Depending on system, mail may or may not prompt another input request for any recipients to cc (carbon copy) to. Press Enter to skip or accept the input, and get the mail sent.
Subject: For Testing Only
This email is for testing the mail delivery system only.
^D (EOT)
Cc:
Tip: If the sender and recipient is on the same system, it’s possible to omit the domain (@domain.com) part of the address, leaving only user name.
It’s also possible to use mail’s arguments or switches to directly send mail without interactive input. For example,
mail -s Test address@domain.com < /dev/null
Command above will immediately send a blank email with empty body to the recipient address with the subject "Test". For more arguments, type "man mail".
HappY SurfinG!!!;-)
0 comments:
Post a Comment