sending mail using qmail-inject

2001-05-24 Thread Qmail

Is it possible to script qmail-inject to send a full bodied message from the
command line?

I'm trying something like this:

( echo to: alerts@XYZnet ; echo from: [EMAIL PROTECTED] ; echo subject: logs ;
grep '@customer.com' /var/log/qmail/* ) | /var/qmail/bin/qmail-inject

I get the header, ok, but no body?

Regards,

Lance




Re: sending mail using qmail-inject

2001-05-24 Thread tc lewis


you might just need to throw an extra echo in between the subject and grep
so there's a blank line between the header and body...

-tcl.


On Thu, 24 May 2001, Qmail wrote:

 Is it possible to script qmail-inject to send a full bodied message from the
 command line?

 I'm trying something like this:

 ( echo to: alerts@XYZnet ; echo from: [EMAIL PROTECTED] ; echo subject: logs ;
 grep '@customer.com' /var/log/qmail/* ) | /var/qmail/bin/qmail-inject

 I get the header, ok, but no body?

 Regards,

 Lance






Re: sending mail using qmail-inject

2001-05-24 Thread Mark Delany

On Thu, May 24, 2001 at 05:55:44PM -0700, Qmail allegedly wrote:
 Is it possible to script qmail-inject to send a full bodied message from the
 command line?
 
 I'm trying something like this:
 
 ( echo to: alerts@XYZnet ; echo from: [EMAIL PROTECTED] ; echo subject: logs ;
 grep '@customer.com' /var/log/qmail/* ) | /var/qmail/bin/qmail-inject
 
 I get the header, ok, but no body?

I bet you got all the matching log entries in the header.

Make sure you put an empty line between the headers and the body.

( echo to: alerts@XYZnet ; echo from: [EMAIL PROTECTED] ; echo subject: logs ;
 echo; grep... ) | ..


Regards.