From owner-freebsd-isp Thu Apr 19 16: 7:45 2001 Delivered-To: freebsd-isp@freebsd.org Received: from shell.csocs.com (csocs.com [63.175.234.65]) by hub.freebsd.org (Postfix) with ESMTP id 5C9F637B440 for ; Thu, 19 Apr 2001 16:07:37 -0700 (PDT) (envelope-from admin@csocs.com) Received: from csocs.com (wolfman@chynapanas04poolA98.chyn.uswest.net [63.228.232.98]) by shell.csocs.com (8.11.2/8.11.2) with ESMTP id f3JN36X35249; Thu, 19 Apr 2001 17:03:07 -0600 (MDT) (envelope-from admin@csocs.com) Message-ID: <3ADF6F72.325202E@csocs.com> Date: Thu, 19 Apr 2001 17:06:26 -0600 From: J & C Frazier Organization: CSOCS Internet Services X-Mailer: Mozilla 4.76 [en] (Win95; U) X-Accept-Language: en MIME-Version: 1.0 To: support@invicta.net Cc: Freebsd-ISP Subject: Re: References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org You looking for something like this: #!/bin/sh echo "CSOCS Automated Billing System." for foo in `cat /etc/master.passwd|cut -f 1 -d ":"` do if expr O`cat /etc/master.passwd|grep $foo|cut -f 5 -d ":"` = "O" >>/dev/null then export expir="yes" export name="`cat /etc/master.passwd|grep $foo|cut -f 8 -d ':'`" echo "Subject: Important: Account Expiring in $1 Days.">>/root/bin/exp.$foo echo "From: CSOCS Automated Billing ">>/root/bin/exp.$foo echo "To: $name <$foo@csocs.com>">>/root/bin/exp.$foo echo "">>/root/bin/exp.$foo echo "$name:">>/root/bin/exp.$foo echo "">>/root/bin/exp.$foo echo "This is an automated e-mail sent to inform you that your account">>/root/bin/exp.$foo echo "with CSOCS will expire in $1 days. If your payment is not received">>/root/bin/exp.$foo echo "by it's due date, your account can be subject to an increase to">>/root/bin/exp.$foo echo "our current prices and suspended until payment is remitted. Please">>/root/bin/exp.$foo echo "direct any questions you may have to billing@csocs.com. If your">>/root/bin/exp.$foo echo "payment has already been sent or previous arrangements have been">>/root/bin/exp.$foo echo "made, please disregard this e-mail. Thank you for choosing CSOCS">>/root/bin/exp.$foo echo "for all your web hosting solutions. We look forward to continue">>/root/bin/exp.$foo echo "doing business with you.">>/root/bin/exp.$foo echo "">>/root/bin/exp.$foo echo "Username: $foo">>/root/bin/exp.$foo echo "Expires: `date -v+$1d -v0H -v1M "+%m-%d-%Y at %H:%M MST"`.">>/root/bin/exp.$foo echo "">>/root/bin/exp.$foo echo "CSOCS Automated Billing CSOCS INTERNET SERVICES">>/root/bin/exp.$foo echo "billing@csocs.com 1623B Washakie Loop.">>/root/bin/exp.$foo echo "http://www.csocs.com Cheyenne, WY 82001">>/root/bin/exp.$foo /usr/sbin/sendmail -t < /root/bin/exp.$foo rm /root/bin/exp.$foo echo " Accounts Expiring in $1 days:" echo " $foo" else fi done InvictaNet Support wrote: > I realise this may be very basic - but... > > In a shell script that I am slowly getting to work, I have the line: > > "echo New User ${1} ${2} | mail root" > > This does exactly what it says on the box (English TV advert joke), but... > > How can I get some/all of this information on the subject line of the > message instead of/as well as in the body? > > Martyn > ----------------------------------------------------- > InvictaNet - The Internet in Plain English, Guaranteed > http://www.invictanet.co.uk > info@invictanet.co.uk > phone: 08707 440180 > fax: 08707 440181 > ------------------------------------------------------ > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-isp" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message