From owner-freebsd-questions Tue May 28 15:11:12 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id PAA06334 for questions-outgoing; Tue, 28 May 1996 15:11:12 -0700 (PDT) Received: from who.cdrom.com (who.cdrom.com [204.216.27.3]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id PAA06285 for ; Tue, 28 May 1996 15:11:06 -0700 (PDT) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by who.cdrom.com (8.6.12/8.6.11) with ESMTP id KAA06587 for ; Tue, 28 May 1996 10:13:11 -0700 Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id KAA11302; Tue, 28 May 1996 10:10:01 -0700 From: Terry Lambert Message-Id: <199605281710.KAA11302@phaeton.artisoft.com> Subject: Re: Direct mail program To: admin@quebecweb.com Date: Tue, 28 May 1996 10:10:01 -0700 (MST) Cc: questions@freebsd.org In-Reply-To: <199605281200.IAA21879@quebecweb.com> from "admin@quebecweb.com" at May 28, 96 08:00:50 am X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > I run FreeBSD 2.0 on a PC machine. > > I look for a perl or sh program that let a file > being mailed to a recipient (xxx@www.zzz) > > This must be a file because i take a string coming from the web > and put it in a temporary file. I print a copy of the file > before to send it by fax, > but cannot send it by mail because of the CTRL-D that is > necessary to send mail. > > I need a perl of sh routine that mail the file > to a recipient Redirect input; the end of the file is an implicit ^D. #!/bin/sh # # sendfile if test "x$2" == "x" then echo "usage: sendfile " >&2 exit 1 fi mail -s "File Transmission" $1 < $2 exit $? Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.