On Wed 04 Jan 2006 23:52:52 GMT , Andre Turpin <[EMAIL PROTECTED]> wrote:
I've got some text files outputted from our billing systems that are rather
pretty, and I'm looking to email these to each customer. They look like the
following. Don't make too much fun, but we used to use a program called Sims
on a Macintosh, and we could just drop the text files in the queue directory
and it would process them and send them off (slowly...but it worked). Now
I'm trying to do something similar with Exim 4.54.
[snip]

As long as the messages themselves conform to RFC2822 and contain all the relevant header lines, you should be able to drop them in a specific (_not_ the spool directory) directory on the mail server, and then run something like this from a cron job.

#!/bin/sh
# maybe include some error trapping to generate a run report
# which could be mailed to the administrators
#
for FILE in /path/to/files/*
do
 /path/to/exim -bm -t -oi < $FILE
done
# EOF

Which takes each message in turn, then pumps it through as a locally-generated message on standard input (-bm), sender/recipient(s) taken from From:/To:/Cc:/Bcc: lines in message header (-t), terminating the message on EOF rather than a single . (-oi).

Hope that helps.

Graeme


--
## List details at http://www.exim.org/mailman/listinfo/exim-users ## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://www.exim.org/eximwiki/

Reply via email to