From owner-freebsd-questions Tue Nov 20 22:17:24 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mip.co.za (puck.mip.co.za [209.212.106.44]) by hub.freebsd.org (Postfix) with ESMTP id B231637B405 for ; Tue, 20 Nov 2001 22:17:08 -0800 (PST) Received: from patrick (patrick.mip.co.za [10.3.13.181]) by mip.co.za (8.9.3/8.9.3) with SMTP id IAA98993; Wed, 21 Nov 2001 08:16:33 +0200 (SAST) (envelope-from patrick@mip.co.za) From: "Patrick O'Reilly" To: "Marc" Cc: Subject: RE: File-attach Date: Wed, 21 Nov 2001 08:21:28 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-Reply-To: <20011121035735.GA51854@dan.emsphone.com> X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > -----Original Message----- > From: owner-freebsd-questions@FreeBSD.ORG > [mailto:owner-freebsd-questions@FreeBSD.ORG]On Behalf Of Dan Nelson > Sent: 21 November 2001 05:58 > To: Marc > Cc: freebsd-questions@FreeBSD.ORG > Subject: Re: File-attach > > > In the last episode (Nov 20), Marc said: > > How do I send an output file as an file-attachment via email using > > something similar to the following line: > > > > perl procedure.pl | mail john.doe@domain.com > > Please don't piggy-back questions onto other threads. > > You can use the mutt mailer to attach arbitrary files to messages: > > echo "see attached" | mutt -a /boot/kernel/kernel user@host.com > > Or if you are using perl, see the p5-MIME-Lite or p5-MIME-Lite ports. > which generate and send MIME multipart messages. > If you are wanting to stick to stuf that will run in a shell (ie, NOT perl): 1) have a look at 'mpack' in the ports: caesar carrot:/usr/ports# make search key=mpack Port: mpack-1.5 Path: /usr/ports/converters/mpack Info: External MIME packer/unpacker Maint: ache@FreeBSD.org Index: converters mail news B-deps: R-deps: mpack can be used in scripts. It has one caveat (if I remember correctly), you MUST have an attachment for the email. 2) I wrote a script once-upon-a-time which allows you to send an email with content and/or attachment. It was basically a wrapper for sendmail with uuencode to do the attachemnts. If you need it let me know and I'll dig it up. Patrick. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message