From b5ef37ff8c4735d5c1edacb87a1482dda21bd09e Mon Sep 17 00:00:00 2001 From: sitaramp <2187750+sitaramp@users.noreply.github.com> Date: Mon, 16 Sep 2019 13:03:43 -0400 Subject: [PATCH] mail: add page (#2669) --- pages/common/mail.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 pages/common/mail.md diff --git a/pages/common/mail.md b/pages/common/mail.md new file mode 100644 index 000000000..50a756ed9 --- /dev/null +++ b/pages/common/mail.md @@ -0,0 +1,16 @@ +# mail + +> The command operates on the user's mailbox if no argument is given. +> To send an email the message body is built from standard input. + +- Send a typed email message. The commandline below continues after pressing Enter key. Input CC email-id (optional) press Enter key. Input message text (can be multi-line). Press "Ctrl-D" key to complete the message text: + +`mail --subject={{"subject line"}} {{to_user@example.com}}` + +- Send an email that contains file content: + +`mail --subject={{"$HOSTNAME filename.txt"}} {{to_user@example.com}} < {{path/to/filename.txt}}` + +- Send a tar.gz file as an attachment: + +`tar cvzf - {{path/to/directory1 path/to/directory2}} | uuencode {{data.tar.gz}} | mail --subject={{"subject line"}} {{to_user@example.com}}`