Unix mail command

It allows us to send a command from a UNIX console.

Sample usage:

   1 [user@host home]$ mail -s "Test subject" destination.email@example.net
   2 Test message.
   3 Line 2
   4 Line 3
   5 EOT
   6 [user@host home]$

Send web page attached email

   1 #!/bin/sh
   2 # gets web page
   3 /usr/bin/wget http://www.example.net/page.html -O /tmp/page.html
   4 # sends email body with attached web page
   5 /bin/cat /home/userx/mailBody.txt | /bin/mail -a /tmp/page.html -s "Subject X" destination1@example.com destination2@example.com destination3@example.com

UnixMailCommand (last edited 2013-07-21 01:12:24 by 46)