[wplug] Auto send email every x minutes
Eric Cooper
ecc at cmu.edu
Sat Nov 6 17:48:58 EDT 2010
On Sat, Nov 06, 2010 at 05:17:01PM -0400, Arnaud wrote:
> Hello all. I'm looking for a way to automate the sending of an email
> every x minutes. The scheduling part I can automate with cron but
> it's the MTA setup that concerns me. I'm running ubuntu and feel
> like setting up sendmail or exim would be overkill. Is there a
> simpler linux utility for doing what I want. Something like Blat in
> the windows environment that I can incorporate into a simple script.
Ubuntu almost certainly already installs a mail transport agent
like exim4 or postfix for you. What you need is a scriptable
mail user agent.
I recommend mailx, from the bsd-mailx or heirloom-mailx package.
You can do
$ mailx -s "Subject" joe.shmoe at gmail.com < message_body.txt
or whatever.
I use the heirloom-mailx version because it makes it easy to add
MIME attachments to the email.
--
Eric Cooper e c c @ c m u . e d u
More information about the wplug
mailing list