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.

Haim.


> -----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
> 
> Before anybody answers "mimeencode" or anything from the metamail: try
> using this and see if you call metamail a working solution. 
> Its inability
> to automatically detect the mime type is irrtating.
> 
> There is also 'sendfiles' that sends the files inside one 
> compress ('.Z')
> tarball.
> 
> Any ideas?
> 
> >From time to time I find myself in need for such a "building 
> block" and
> usually work around this need.
> 
> -- 
> 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]
> 
> 
> 


================================================================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]

Reply via email to