Scripting Email

Bob Harrington rharrin2-bJEeYj9oJeDQT0dZR+AlfA at public.gmane.org
Thu Mar 4 18:46:18 UTC 2004


On Thu, Mar 04, 2004 at 10:34:05AM -0500, William O'Higgins wrote:
> I would like to be able to send email programmatically (via script and at
> or cron).  When one looks at "command line email" in Google you'll see a
> lot of stuff about `mail`.  My MTA is just forwarding stuff to a smarthost
> (leave off for the moment that the "smart" host is actually a flaming
> ninnyhammer) and so `mail` doesn't help me.
> 
> I've tried using Perl and Net::SMTP, but it provides insufficient
> control over headers, and gets flagged as spam.
> 
> Is there a program that might help me, or should I try to script a
> telnet session, or do this in Perl with Net::Socket.  Any suggestions
> welcome.  Thanks.

Mutt works. I have it configured to use SSMTP to forward mail to a
smarthost.

cat email-body.txt | mutt -s "Email subject" receiver-hcDgGtZH8xNBDgjK7y7TUQ at public.gmane.org

--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list