Also another much scriptic solution is to use metasend, which does the 
job, but needs the mime type for each file, which can be found from 
'file -i'.


On Mon, 21 Jan 2002, Tzafrir Cohen wrote:

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

-- 
Behdad
1 Bahman 1380, 2002 Jan 21

[Finger for Geek Code]


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