0

I tried a couple of methods to send a report mail from my shell script. It either gives me an error or I do not get any mail. Please find it below.

echo "My Mail" | mail -s "My Subject" achintxxxxx@gmail.com

Following gives me the error:

mail: illegal option -- s
usage: mail [+] [-epqr] [-f file]
mail [-dt] persons

and if I use the below command

echo "My Mail" | mailx -s "My Subject" achintxxxxx@gmail.com

It does not give me any error, but I would not receive any mail at achintxxxxx@gmail.com(or any other mail ID)

Would anyone help me out here??

Utsav
  • 7,914
  • 2
  • 17
  • 38

0 Answers0