SendEmail
From Wiki99
←Older revision | Newer revision→
↑ Computers ↑
← prev: Fetchmail
next: Apache →
Contents |
SendEmail
We're now talking about ever more specialized applications. Quite possibly you will have no need to use the Fetchmail we discussed on the previous page, and likewise you may have no need for sendEmail.
The problem sendEmail solve is that it allows you to send mail from the command line, thus, for example, allowing you to send status mail from scripts.
MacOS X has the program mail built in, and this is good enough for many purposes. Where it is problematic is if you want to send HTML email. This is, of course, even more specialized. I needed this capability because I have a script that generates information I wanted to have on my iPhone, and the easiest way to get it there and looking good was to create it as a block of HTML and mail it to myself.
Once you know that sendEmail exists, everything from this point on is pretty trivial.
Installation
There is a page of install information at http://sendemail.darwinports.com/, but it boils down to
There is a page describing the program and its options at http://caspian.dotconf.net/menu/Software/SendEmail/.
Usage
To use it to send email, you want a command line like
(echo '<html>' ; cat $THE_HTML_FILE) \
| sendemail -u 'SUBJECT LINE FOR THE EMAIL' \
-f to@toEmailAddress.org -t from@fromEmailAddress.org &>/dev/null
Where to learn more
I learned the above info setting up my email server from various places, but the single most useful source was http://www.stepwise.com/Articles/Workbench/eart.index.html You might want to read this article. It is a little more technical than mine, and deals with a rather earlier time in MacOS X's evolution.
We will later set up squirrelmail so that we have webmail access to our mail, but before that we need to set up our web server.

