From owner-freebsd-questions Fri Nov 10 5: 3:27 2000 Delivered-To: freebsd-questions@freebsd.org Received: from relay01.esat.net (relay01.esat.net [192.111.39.11]) by hub.freebsd.org (Postfix) with ESMTP id 523A937B479 for ; Fri, 10 Nov 2000 05:03:22 -0800 (PST) Received: from blackwidow.twelvehorses.com [193.120.127.42] by relay01.esat.net with esmtp id 13uDpw-00067E-00; Fri, 10 Nov 2000 13:03:20 +0000 Received: by BlackWidow.twelvehorses.int with Internet Mail Service (5.5.2650.21) id ; Fri, 10 Nov 2000 13:00:35 -0000 Message-ID: <856E94D34FF3D311B5FE00508B6B8BD223CCB8@BlackWidow.twelvehorses.int> From: Daniel Podolsky To: "'Dib, Allan L'" , "'freebsd-questions@FreeBSD.ORG'" Subject: RE: Sending an attachment from the command line Date: Fri, 10 Nov 2000 13:00:25 -0000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C04B16.36DBFF48" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C04B16.36DBFF48 Content-Type: text/plain; charset="iso-8859-1" The simple solution is: uuencode | mail -s "" . If you not happy with uuencode attachments you can use some sort of command line mime encoder instead of uuencode... -----Original Message----- From: Dib, Allan L [mailto:Dib.Allan.L@edumail.vic.gov.au] Sent: Friday, November 10, 2000 12:53 PM To: 'freebsd-questions@FreeBSD.ORG' Subject: Sending an attachment from the command line Hiya everyone, I currently use the very useful 'mail' command from the command line and from scripts to e-mail output of a progam. An example: ls|mail -s "hello" dib.allan.l@edumail.vic.gov.au will e-mail me the output of the 'ls' command with a subject line "hello". I need to be able to e-mail a given (binary) file as an attachmentment with a similar kind command. I have had no luck with man pages for either sendmail or the 'mail' command. For example how would I e-mail someone the file /home/allan/test.tar.gz with one command line. If anyone could help me with this it would be greatly appreciated. ------_=_NextPart_001_01C04B16.36DBFF48 Content-Type: text/html; charset="iso-8859-1" Sending an attachment from the command line
The simple solution is:
uuencode <YourFile> <YourFile> | mail -s "<YourFile>" <YourAddress>.
If you not happy with uuencode attachments you can use some sort of command line mime encoder instead of uuencode...
-----Original Message-----
From: Dib, Allan L [mailto:Dib.Allan.L@edumail.vic.gov.au]
Sent: Friday, November 10, 2000 12:53 PM
To: 'freebsd-questions@FreeBSD.ORG'
Subject: Sending an attachment from the command line

Hiya everyone,

I currently use the very useful 'mail' command from the command line and from scripts to e-mail output of a progam. An example:

ls|mail -s "hello" dib.allan.l@edumail.vic.gov.au

will e-mail me the output of the 'ls' command with a subject line "hello".

I need to be able to e-mail a given (binary) file as an attachmentment with a similar kind command. I have had no luck with man pages for either sendmail or the 'mail' command. For example how would I e-mail someone the file /home/allan/test.tar.gz with one command line.

If anyone could help me with this it would be greatly appreciated.

------_=_NextPart_001_01C04B16.36DBFF48-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message