Send As SMS

5/19/2006

send mail from the command-line

to send mail from the command-line, use the mailx utility. this works on both mac os x and linux. it's also super-convenient for cron jobs where you want to auto-send emails; you can't stick pine into a script.

echo "message body" | mailx -s "subject header" recipient@isp.com
nb: your message may bounce back, complaining "sender domain must exist." if so, this means that the isp of your e-mail recipient is blocking e-mails from your machine. try sending the message to their gmail account - i've noticed that google doesn't block messages from unresolvable domains.


0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home

My blog has moved! Redirecting...

You should be automatically redirected. If not, visit http://stinkpot.afraid.org:8080/tricks/ and update your bookmarks.