From owner-freebsd-questions@FreeBSD.ORG Fri Jul 23 05:52:52 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EBCE616A4CE for ; Fri, 23 Jul 2004 05:52:52 +0000 (GMT) Received: from cromagnon.cullmail.com (cromagnon.cullmail.com [67.33.58.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8E54543D53 for ; Fri, 23 Jul 2004 05:52:52 +0000 (GMT) (envelope-from jamoore@cromagnon.cullmail.com) Received: from cromagnon.cullmail.com (localhost.cullmail.com [127.0.0.1]) i6N5v8tg094797; Fri, 23 Jul 2004 00:57:08 -0500 (CDT) (envelope-from jamoore@cromagnon.cullmail.com) Received: from localhost (localhost [[UNIX: localhost]]) by cromagnon.cullmail.com (8.12.10/8.12.10/Submit) id i6N5v7up094796; Fri, 23 Jul 2004 00:57:07 -0500 (CDT) (envelope-from jamoore) From: Jay Moore To: Wojciech Puchar Date: Fri, 23 Jul 2004 00:57:06 -0500 User-Agent: KMail/1.6.1 References: <200407162036.i6GKaNt11099@www.plutao.lusodigital.net> <200407202324.30211.jaymo@cromagnon.cullmail.com> <20040721090847.F85700@chylonia.3miasto.net> In-Reply-To: <20040721090847.F85700@chylonia.3miasto.net> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200407230057.06978.jaymo@cromagnon.cullmail.com> cc: carla.neves@nereus.pt cc: freebsd-questions@freebsd.org cc: Murray Taylor Subject: Re: How to send attached files on sendmail with mail tool? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: jaymo@cromagnon.cullmail.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jul 2004 05:52:53 -0000 On Wednesday 21 July 2004 02:10 am, Wojciech Puchar wrote: > > > cat file | uuencode tgt_filname | mail -s "subject" test@example.com > > uuencode > instead of cat. less one unneeded piping. > > > > subject can be derived from shell script variables if necessary. > > > > Do you have to do a uudecode on the receiving end to recover the file? > > > > I tried this - sending a pdf file from this FreeBSD system to a Windoze > > user that gets mail via POP - it didn't work. The filename came through, > > and it was listed as an attachment, but there was nothing useful in the > > file. > > i think windoze just can't decode uuencoded attachments right. > > it only supports base64 right. > > metamail will be useful, possibly > > /usr/local/bin/encode-base64 was installed by package p5-MIME-Base64-2.21 I'm sure you are correct about Windows... I guess the point I was trying to make is that I think Base64 encoding and appropriate MIME headers are required to be placed in the message to make it a "compliant" message. So while this script may work in certain limited situations, it's probably not a good "general purpose" solution. Jay