sending mail using qmail-inject
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
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
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.