[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [SAGE] Output from "cron" command



> Does anyone have any good suggestions on replacements for mailx on 
> Solaris?  /usr/bin/mail doesn't let you set the subject on the 
> command-line, but it will look for headers when you pass it a message 

A shell script wrapper around sendmail -t will work.

    safe_mail -s "Fun stuff" recipient1 [recipient2 ...]

Parse args, then:

    { echo -n "${subject}${to}"; cat; } | sendmail -t 

Details left as an exercise for the reader.