From owner-freebsd-questions@FreeBSD.ORG Thu Dec 8 23:15:59 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 0AE3C16A420 for ; Thu, 8 Dec 2005 23:15:59 +0000 (GMT) (envelope-from MTaylor@bytecraft.com.au) Received: from wolf.bytecraft.au.com (wolf.bytecraft.au.com [203.39.118.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id EDC6C43D49 for ; Thu, 8 Dec 2005 23:15:44 +0000 (GMT) (envelope-from MTaylor@bytecraft.com.au) Received: from localhost (localhost [127.0.0.1]) by wolf.bytecraft.au.com (8.12.11/8.12.11) with ESMTP id jB8NF4DN097224; Fri, 9 Dec 2005 10:15:04 +1100 (EST) (envelope-from MTaylor@bytecraft.com.au) Received: from wolf.bytecraft.au.com ([127.0.0.1]) by localhost (wolf.bytecraft.au.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 96974-02-4; Fri, 9 Dec 2005 10:15:04 +1100 (EST) Received: from svmarshal.bytecraft.au.com ([10.0.0.4]) by wolf.bytecraft.au.com (8.12.11/8.12.11) with ESMTP id jB8NEiac097181; Fri, 9 Dec 2005 10:14:44 +1100 (EST) (envelope-from MTaylor@bytecraft.com.au) Received: from svmailmel.bytecraft.internal (Not Verified[10.0.0.24]) by svmarshal.bytecraft.au.com with MailMarshal (v5, 0, 3, 78) id ; Fri, 09 Dec 2005 10:14:43 +1100 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Date: Fri, 9 Dec 2005 10:14:43 +1100 Message-ID: <04E232FDCD9FBE43857F7066CAD3C0F105438B@svmailmel.bytecraft.internal> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Send emails with attachments from command line Thread-Index: AcX8C5DPCaPyzFC7RR63hamXWVNU1wAQSkrg From: "Murray Taylor" To: , Cc: freebsd-questions@freebsd.org Subject: RE: Send emails with attachments from command line X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Dec 2005 23:15:59 -0000 =20 > -----Original Message----- > From: owner-freebsd-questions@freebsd.org=20 > [mailto:owner-freebsd-questions@freebsd.org] On Behalf Of=20 > freebsd@henriklidstrom.se > Sent: Friday, December 09, 2005 2:23 AM > To: ashley.moran@codeweavers.net > Cc: freebsd-questions@freebsd.org > Subject: SV: Send emails with attachments from command line >=20 > > -----Ursprungligt meddelande----- > > Fr=E5n: owner-freebsd-questions@freebsd.org > > [mailto:owner-freebsd-questions@freebsd.org] F=F6r Ashley Moran > > Skickat: den 8 december 2005 16:05 > > Till: freebsd-questions@freebsd.org > > =C4mne: Re: Send emails with attachments from command line > > > > On Thursday 08 December 2005 13:35, Igor Robul wrote: > > > On Thu, Dec 08, 2005 at 12:16:34PM +0000, Ashley Moran wrote: > > > > Does anyone know how to send emails with attachments=20 > from the > > > > command line? I've replaced sendmail with ssmtp and I can send plain > > > > messages with mail, but I don't know how to go about preparing > > MIME > > encoded emails. Any pointers? > > > > > > Look at > > > mail/metamail > > > > > > also "mutt" can send mail with attachments in batch mode. > > > > > > Thanks > > > > Metamail needs X11 which I don't want on the server, so=20 > I've gone with mutt. >=20 > I sometimes use: > #uuencode filetosend.ext filetosend.ext | mail -s "File"=20 > user@domain.tld >=20 > But not sure if thats correct. >=20 > /Henrik >=20 I send all sorts of reports automagically with cat filename | uuencode filename | mail -s filename user@example.com where filename can be a shell variable etc FWIW some of the reports are perl generated Excel spreadsheets and they travel just fine to the M$ challenged. mjt --------------------------------------------------------------- The information transmitted in this e-mail is for the exclusive use of the intended addressee and may contain confidential and/or privileged material. Any review, re-transmission, dissemination or other use of it, or the taking of any action in reliance upon this information by persons and/or entities other than the intended recipient is prohibited. If you received this in error, please inform the sender and/or addressee immediately and delete the material.=20 E-mails may not be secure, may contain computer viruses and may be corrupted in transmission. Please carefully check this e-mail (and any attachment) accordingly. No warranties are given and no liability is accepted for any loss or damage caused by such matters. --------------------------------------------------------------- ***This Email has been scanned for Viruses by MailMarshal.***