Make my Sweex router send me emails under script control.
(this can send alerts when something goes wrong)

I discovered
ssmtp which can send emails from my old Sweex router under openwrt

install it -
ipkg install ssmtp_2.61-2_mipsel.ipk

ssmtp requires two files to be configured -


# /etc/ssmtp.conf -- a config file for sSMTP sendmail.
# <- my usual email address <- the smtp server of my email provider


# sSMTP aliases
# Format: local_account:outgoing_address:mailhub
# Example: root:your_login@your.domain:mailhub.your.domain[:port]
# where [:port] is an optional port number that defaults to 25.

Create an email message and save as a text file

From: <>
To: <>
Subject: testing Sweex Mail again

Message here after a blank line

cd to the folder with the message then type this to send the message -

cat email_message.txt | ssmtp -v

The | character says "pipe the output generated by cat to my email address"

I now intend to write a script that checks the level of the food in my chicken feed hopper
and sends me an email alert when it gets low (but only once per day!)