mailto is a very simple command line program for sending e-mail (not reading e-mail). I wrote this program 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 [-s subject] [recipient] -s subject - The subject can optionally be specified on the command line. recipient - A recipient can optionally be specified on the command line if you are going to type in your message, but one is required if you are piping text from another source.
You might want to send a quick e-mail message from a Terminal window without starting BeMail.
$ 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 -s "Bad News" user@host.net 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 -s "Your Subject" user@host.net < mailto.cpp
Maybe you want to send someone a uuencoded file. If no subject is specified, then the subject of the message will be set to "No Subject".
uuencode mailto.zip mailto.zip | mailto user@host.net
From within your ppp-script, you might want to send someone your IP address (and a short, silly message).
if [ $1 = "up" ]; then fortune | mailto -s $4 user@host.net fi
I hope you find this program useful. With a little creativity, I'm sure you can come up with some other neat uses. I have included the source so that you can see how mailto works and change it to suit your own needs. Also, everyone can thank John Yanarella (yanarejm@muohio.edu) for providing me with an x86 mailto executable.
Wesley Dungan
wesley@idsi.net