[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
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