From owner-freebsd-questions@FreeBSD.ORG Wed Dec 31 14:35:04 2003 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 60B7716A4CE for ; Wed, 31 Dec 2003 14:35:04 -0800 (PST) Received: from mail.tsgincorporated.com (mail.tsgincorporated.com [67.66.242.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1E82243D39 for ; Wed, 31 Dec 2003 14:35:01 -0800 (PST) (envelope-from micheal@tsgincorporated.com) Received: (from root@localhost) by mail.tsgincorporated.com (8.12.10/8.12.8) id hBVMZ0Q5085726; Wed, 31 Dec 2003 16:35:00 -0600 (CST) (envelope-from micheal@tsgincorporated.com) Received: from micheal (micheal.tsgincorporated.com [67.66.242.77]) hBVMYv76085716; Wed, 31 Dec 2003 16:34:57 -0600 (CST) (envelope-from micheal@tsgincorporated.com) Message-ID: <01b501c3cfee$52390320$4df24243@tsgincorporated.com> From: "Micheal Patterson" To: "Chad Albert" , References: <433CEE75B1339547BBB373B340665384116B16@hfmail01.sgf.healthcarefirst.med> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by AMaViS 0.3.12 Subject: Re: mail X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Wed, 31 Dec 2003 22:35:04 -0000 X-Original-Date: Wed, 31 Dec 2003 16:34:52 -0600 X-List-Received-Date: Wed, 31 Dec 2003 22:35:04 -0000 ----- Original Message ----- From: "Chad Albert" To: Sent: Wednesday, December 31, 2003 3:46 PM Subject: mail > I am writing a script that mails me when certain events occur. I am > using mail(1) to notify me by email when some things happen. I have > read the man page and I don't see a way to attach a file, does anyone > know how to use mail(1) to attach a file? If it's a text file, just cat filename.ext |mail -s "subject" sender@address to send the contents to the target address. On the other hand, if you want to attach the file, use mailx from ports. There's an -a flag to attach files to outbound emails. -- Micheal Patterson TSG Network Administration 405-917-0600 Confidentiality Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.