[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Looking for a program to email a file as an attachment from command line
uuencode filename filename | mailx "Subject" recipient@domain.com
try this...
> -----Original Message-----
> From: dbartley@samsrv [mailto:dbartley@samsrv]On Behalf Of Dirk H
> Bartley
> Sent: Monday, October 02, 2000 10:46 PM
> To: members@kalamazoolinux.org
> Subject: Re: Looking for a program to email a file as an attachment from
> command line
>
>
> The file is a text file.
>
> cat file | sendmail toname@todomain
>
> works fine, but only if the recipient is using an email client with a
> default font that keeps all the characters lined up by having the same
> width. (MS strikes again) If I rename and send the file as a *.doc, the
> user opens it in word and word understands how to open it. But express
> mangles it into an unstructured mess. So if I could send it as an
> attachment instead of part of the body of the text, all would be fine.
>
> uuenview looks like it should do the job, which Adam responded
> with. Now if
> I can get it compiled on or for SCO, I will be fine.
>
> uuenview [-v] [-a] [-u|-x|-b] [-lines] [-o] [-od path]
> [-m email] [-p newsgroup] [-s subject]
> [file(s)]
>
> Dirk
>
> Steve Scherbinski wrote:
> >
> > What kind of file do you want to send? If the file is is just text, I
> > believe the commands would pretty much work as you've written them.
> >
> > Steve
> >
> > Dirk H Bartley wrote:
> > >
> > > I would like a command that would email a file as an
> attachment from the
> > > command line. (so that I can run it from cron)
> > >
> > > Sendmail works and you can use the -f command line option to determine
> > > the from address.
> > >
> > > mail has a -s command line option to determine the subject. What
> > > program has a command line option to send the file as an
> attachment. It
> > > could be it's own command like mail or it could pipe into sendmail.
> > >
> > > Ideally it would look like
> > >
> > > newcommand -a file -s subject | sendmail -f fromname@fromdomain
> > > toname@todomain
> > >
> > > or
> > >
> > > newcommand -a file -s subject | sendmail toname@todomain
> > >
> > > Does such a command exist.
> > >
> > > Dirk
>
>