2012/5/24 Chris Evans <aaxiomfin...@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
>     # num...@txt.att.net
>     SUBJECT="digitalatoll server down"
>     # Email To ?
>     EMAIL="9166126...@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                                 j...@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
--------------------------------------------------------------------------------------


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/CABS=y9t1ihqft7c4danqktpxtg6h+5vcyn-qvdpmxcffpo7...@mail.gmail.com

Reply via email to