First check. whether Sendmail is running;
#/etc/init.d/sendmail status
if the status shows that it;s not, then start it;
#/etc/init.d/sendmail restart
then , send mails using either the mail or mutt command;
#ehco "body of the mail" | ,ail -s "Subject of the mail" toAddress
Give the recipient's mail ID in place of toAddress.
As for the body of the mail, you can also redirect it from a file, as follows,
#mail -s "subject of the mail" toAddress < body_mail.txt
If u want to send a file as an attachment, you can use mutt instead:
#echo "body of the mail" | mutt -s "subecjt of the mail" \-a fileToAttach.txt toAddress
Give the recipient's email ID in place of toAddress.
Blog Archive
-
▼
2009
(8)
-
▼
October
(8)
- Sending mails using the command line
- Let us ping range of IPs machine
- Useradd via shell script IN Linux
- To check desire machine status for up or down by I...
- To know Disk space Alert by mail in Linux
- Access Windows shares from the terminal
- Aircel/Airtel GPRS on linux via USB cable/bluetoot...
- To check Linux service is on or off
-
▼
October
(8)