On Mon, 21 Jan 2002, Haim Gelfenbeyn wrote: > > > -----Original Message----- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED]] On Behalf Of Tzafrir Cohen > > Sent: Monday, January 21, 2002 6:13 PM > > To: Linux-IL Mailing List > > Subject: Re: forwarding mails from mailbox to another address.. > > > > > > Another unrelated message: > > > > How can I attach a file to a message from the command-line? > > > > I can run: > > > > mail <file [EMAIL PROTECTED] > > > > But this gets the file in the content of the message. How do > > I get a file > > as a mime part of a message? > > > > Note that I would like to be able to attach multiple files, > > and not to be > > bothered with detecting mime types. Something like: > > > > send_files --subject="subject" --to=user1,user2 file1 file2 > > > > Alternatively, something simpler, that creates a multi-part message to > > stdout, that I can feed to 'mail: > > > > make_mime file1 file2 |mail -s "subject" user1 user2 > >
> Mutt has command-line options similar to what you need. We even used > mutt to send some files as attachments via e-mail in a cgi script. Thanks. This works echo "The files you asked" |mutt -s "subject" -a file1 -a file2 user1 user2 -- Tzafrir Cohen mailto:[EMAIL PROTECTED] http://www.technion.ac.il/~tzafrir ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]