mailto is a very simple command line program for sending e-mail (not reading e-mail). It behaves somewhat like the UNIX `mailto' program. My motivation for writing this program was so that I could send e-mail messages from within shell scripts. In particular, I wanted a way to send my IP address in an e-mail message every time I connected to the Internet via a PPP connection.
mailto [recipient] recipient - This parameter is optional if you are going to type in your message, but required if you are piping text from another source.
You might want to send a quick e-mail message.
$ mailto To: user@host.net Subject: Good News Type a period (`.') on a line by itself to send this message. I've been looking for a mail program like this! . OR $ mailto user@host.net Subject: Bad News Type a period (`.') on a line by itself to send this message. I don't need another stinkin' mail program! .
You might want to send someone a text file.
mailto user@host.net < mailto.C
Maybe you want to send someone a uuencoded file.
uuencode mailto.zip mailto.zip | mailto user@host.net
From within your ppp-script, you might want to send someone your IP address.
if [ $1 = "up" ]; then echo $4 | mailto user@host.net fi
I hope you find this program useful. If you are creative, I'm sure you can come up with some other neat e-mail tricks. I have included the source so that you can see how it works and change it to suit your own needs. Good luck.
Wesley Dungan
wesley@idsi.net