[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Looking for a program to email a file as an attachment from command line




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