Re: [SLUG] command Line mailer that can send an attachment

2003-07-10 Thread Angus Lees
At Wed, 09 Jul 2003 10:13:34 +1000, Terry Collins wrote:
> As per subject, need a command line mailer that can send a file as an
> attachment.

for MIME/binary attachment stuff, you really want the scripts/tools
that come from "metamail".

includes "mimencode", which is good for doing the gruntwork, "mailto"
which is an interactive composer along the lines of mail(1), and
"mimeit" which is a good wrapper for shell scripts to "just send this
binary file to this user with this mime type".

-- 
 - Gus
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


Re: [SLUG] command Line mailer that can send an attachment

2003-07-08 Thread Kevin Waterson
This one time, at band camp, Terry Collins <[EMAIL PROTECTED]> wrote:

> Michael Lake wrote:
> > 
> > Terry Collins wrote:
> > 
> > > As per subject, need a command line mailer that can send a file as an
> > > attachment.
> > 
> > Its called 'mail' and yes it can send attachments.
> > man mail

for o in `ls -1'; do
 mail -s "Subject goes here" [EMAIL PROTECTED] < cave.jpeg
done

re
Kevin
-- 
 __  
(_ \ 
 _) )            
|  /  / _  ) / _  | / ___) / _  )
| |  ( (/ / ( ( | |( (___ ( (/ / 
|_|   \) \_||_| \) \)
Kevin Waterson
Port Macquarie, Australia
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


Re: [SLUG] command Line mailer that can send an attachment

2003-07-08 Thread mlh

mutt -s SUBJECT -a ATTACHMENT [EMAIL PROTECTED] < /dev/null


... the /dev/null redirection is useful from the command
line so that mutt doesn't ask you any more silly questions.

Multiple "-a attachment" are accepted.




-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


Re: [SLUG] command Line mailer that can send an attachment

2003-07-08 Thread Robert Collins
On Wed, 2003-07-09 at 11:14, Jamie Wilkinson wrote:
> This one time, at band camp, Terry Collins wrote:
> >As per subject, need a command line mailer that can send a file as an
> >attachment.
> 
> Robert Collins had a nifty little program called mailfile that he used to
> send the notes I took at the last SLUGlets to me, I guess it's just a simple
> wrapper around mail(1).

mail-files. It's part of sharutils IIRC.

Rob
-- 
GPG key available at: .


signature.asc
Description: This is a digitally signed message part
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


Re: [SLUG] command Line mailer that can send an attachment

2003-07-08 Thread Andrew McNaughton

My version of mail doesn't do attachments, so I wrote a simple script to
do the job.  It's attached.  The interface is similar to that for mail.

Andrew





On Wed, 9 Jul 2003, Terry Collins wrote:

> Date: Wed, 09 Jul 2003 10:58:11 +1000
> From: Terry Collins <[EMAIL PROTECTED]>
> To: Michael Lake <[EMAIL PROTECTED]>
> Cc: Slug List <[EMAIL PROTECTED]>
> Subject: Re: [SLUG] command Line mailer that can send an attachment
>
> Michael Lake wrote:
> >
> > Terry Collins wrote:
> >
> > > As per subject, need a command line mailer that can send a file as an
> > > attachment.
> >
> > Its called 'mail' and yes it can send attachments.
> > man mail
>
> Thanks.
> hmm, we must have different versions as there is no mention of
> attachments in the version I have (sans rh5.0) as all I can do is send
> it as the message.
>
> I'm wanting to do something like
>
> for o in `ls -1'
>   do
>   mailer -a $o  [EMAIL PROTECTED]
>   done
>
> and prefeerably with an older mailer
>
>
>

--

No added Sugar.  Not tested on animals.  May contain traces of Nuts.  If
irritation occurs, discontinue use.

---
Andrew McNaughton   In Sydney
Working on a Product Recommender System
[EMAIL PROTECTED]
Mobile: +61 422 753 792 http://staff.scoop.co.nz/andrew/cv.doc


#!/usr/local/bin/perl
#
# amail - a command line tool for sending files as mail attachments
# 
#  fairly similar in style to 'mail'
#
# usage: 
#   
#   amail [-s Subject] [-c Cc] [-b  Bcc] [-r Reply-to] 
# [-f From] [[-a attachment_file] ,...] address, ... 
#
#
#  addresses may optionally be preceded by -t, in which 
#  case they may appear anywhere in the command line
#
#
#
# Copyright (C) 2000, Andrew McNaughton.
# Distributed under the terms of the Perl Artistic License  
#

use MIME::Entity;

unless (@ARGV) {
print <<"END_USAGE";
Usage:
   amail [-s Subject] [-c Cc] [-b Bcc] [-r Reply-to] [-f From] [[-a attachment_file] 
,...] address, ...
END_USAGE
exit
}


my %types = qw(
.ai application/postscript
.aifc   audio/x-aiff
.aiff   audio/x-aiff
.au audio/basic
.binapplication/octet-stream
.c  text/plain
.c++text/plain  
.cc text/plain
.cdfapplication/x-netcdf
.cshapplication/x-csh
.dump   application/octet-stream
.dviapplication/x-dvi
.epsapplication/postscript
.exeapplication/octet-stream
.gifimage/gif
.gtar   application/x-gtar
.gz application/gzip
.gzip   application/gzip
.h  text/plain
.hdfapplication/x-hdf
.hqxapplication/mac-binhex40
.html   text/html
.jarapplication/java-archive
.jfif   image/jpeg
.jpeimage/jpeg
.jpeg   image/jpeg
.jpgimage/jpeg
.mime   message/rfc822
.mpeg   video/mpeg
.mpgvideo/mpeg
.nc application/x-netcdf
.pdfapplication/pdf
.phptext/html
.pjpimage/jpeg
.pjpeg  image/jpeg
.pl text/x-perl
.pngimage/png
.ps application/postscript
.rgbimage/x-rgb
.rtfapplication/x-rtf
.saveme application/octet-stream
.sh application/x-sh
.shar   application/x-shar
.sitapplication/x-stuffit
.sndaudio/basic
.srcapplication/x-wais-source
.tarapplication/x-tar
.tclapplication/x-tcl
.textext/plain
.text   text/plain
.tifimage/tiff
.tiff   image/tiff
.txttext/plain
.uu application/octet-strea

Re: [SLUG] command Line mailer that can send an attachment

2003-07-08 Thread Jamie Wilkinson
This one time, at band camp, Terry Collins wrote:
>As per subject, need a command line mailer that can send a file as an
>attachment.

Robert Collins had a nifty little program called mailfile that he used to
send the notes I took at the last SLUGlets to me, I guess it's just a simple
wrapper around mail(1).

-- 
[EMAIL PROTECTED]   http://spacepants.org/jaq.gpg
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


Re: [SLUG] command Line mailer that can send an attachment

2003-07-08 Thread jeff . allison

once again with a real address

uuencode "filename" "filename
again"| mail "USER" -s "Subject"

seems to work

Jeff

smime.p7s
Description: S/MIME Cryptographic Signature
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


Re: [SLUG] command Line mailer that can send an attachment

2003-07-08 Thread Michael Lake
Terry Collins wrote:

> Michael Lake wrote:
>>Its called 'mail' and yes it can send attachments.
>>man mail

> Thanks.
> hmm, we must have different versions as there is no mention of
> attachments in the version I have (sans rh5.0) as all I can do is send
> it as the message.

Your right. My 'mail' on Linux does not mention attachments.
Pine can do it though using the -attache file command line option.
Something like this:

 \/ note semicolon
for o in `ls -1'; do
 pine -attach $o [EMAIL PROTECTED]
done


Mike

-- 
Mike Lake
Uni of Technol., Sydney



UTS CRICOS Provider Code:  00099F

DISCLAIMER

This email message and any accompanying attachments may contain
confidential information.  If you are not the intended recipient, do not
read, use, disseminate, distribute or copy this message or attachments.
If you have received this message in error, please notify the sender
immediately and delete this message. Any views expressed in this message
are those of the individual sender, except where the sender expressly,
and with authority, states them to be the views the University of
Technology Sydney. Before opening any attachments, please check them for
viruses and defects.



-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


Re: [SLUG] command Line mailer that can send an attachment

2003-07-08 Thread Jeff_Allison%BLACKSHAW

uuencode "filename" "filename
again"| mail "USER" -s "Subject"

seems to work

Jeff

smime.p7s
Description: S/MIME Cryptographic Signature
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


Re: [SLUG] command Line mailer that can send an attachment

2003-07-08 Thread Terry Collins
Michael Lake wrote:
> 
> Terry Collins wrote:
> 
> > As per subject, need a command line mailer that can send a file as an
> > attachment.
> 
> Its called 'mail' and yes it can send attachments.
> man mail

Thanks.
hmm, we must have different versions as there is no mention of
attachments in the version I have (sans rh5.0) as all I can do is send
it as the message.

I'm wanting to do something like

for o in `ls -1'
do
mailer -a $o  [EMAIL PROTECTED]
done

and prefeerably with an older mailer


-- 
   Terry Collins {:-)}}} email: terryc at woa.com.au  www:
http://www.woa.com.au  
   Wombat Outdoor Adventures 

 "People without trees are like fish without clean water"
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


Re: [SLUG] command Line mailer that can send an attachment

2003-07-08 Thread Michael Lake
Terry Collins wrote:

> As per subject, need a command line mailer that can send a file as an
> attachment.

Its called 'mail' and yes it can send attachments.
man mail

Mike
-- 
Mike Lake
Uni of Technol., Sydney



UTS CRICOS Provider Code:  00099F

DISCLAIMER

This email message and any accompanying attachments may contain
confidential information.  If you are not the intended recipient, do not
read, use, disseminate, distribute or copy this message or attachments.
If you have received this message in error, please notify the sender
immediately and delete this message. Any views expressed in this message
are those of the individual sender, except where the sender expressly,
and with authority, states them to be the views the University of
Technology Sydney. Before opening any attachments, please check them for
viruses and defects.




-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


Re: [SLUG] command Line mailer that can send an attachment

2003-07-08 Thread Chris Deigan
Terry Collins wrote:
>As per subject, need a command line mailer that can send a file as an
>attachment.

mutt works for me.
Word is, pine might also be able to do this for you :-)

 - Chris
[EMAIL PROTECTED]


pgp0.pgp
Description: PGP signature
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug


[SLUG] command Line mailer that can send an attachment

2003-07-08 Thread Terry Collins
As per subject, need a command line mailer that can send a file as an
attachment.

-- 
   Terry Collins {:-)}}} email: terryc at woa.com.au  www:
http://www.woa.com.au  
   Wombat Outdoor Adventures 

 "People without trees are like fish without clean water"
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug