Re: mail not sending message
2012/5/24 Chris Evans <aaxiomfinity@gmail.com>:
> I am having trouble getting mail to send the message I attach the script
> below
>
>
>
> #!/bin/bash
> wget http://digitalatoll.com/
> rc=$?
> if [[ $rc != 0 ]] ; then
> # number@txt.att.net
> SUBJECT="digitalatoll server down"
> # Email To ?
> EMAIL="9166126904@txt.att.net"
> # Email text/message
> EMAILMESSAGE="msg.txt"
> echo error on server! > msg.txt
> mail -s "$SUBJECT" -t "$EMAIL" < $EMAILMESSAGE
> rm msg.txt
> fi
> rm index.html
>
Hi
I think the -t option is not needed just try using
mail -s "$SUBJECT" $EMAIL < $EMAILMESSAGE
Anyway:
What error do you get?
Is the mail getting into you MTA queue? what is the output of running mailq?
Regards
--------------------------------------------------------------------------------------
Juan Sierra Pons juan@elsotanillo.net
Linux User Registered: #257202 http://www.elsotanillo.net
GPG key = 0xA110F4FE
Key Fingerprint = DF53 7415 0936 244E 9B00 6E66 E934 3406 A110 F4FE
--------------------------------------------------------------------------------------
Reply to: