Re: sending files from the cmd line...

Brent Welch <[email protected]>
Newsgroups gmane.mail.exmh.devel
Message-ID <[email protected]>
There is a Standard Tcl Library "mime" package that can assemble mime
messages.  Obviously, all the exmh machinery predates this.  I haven't
played with it much, but if you go to SourceForge /projects/tcllib
you can download the latest. It goes something like

package require mime

set part1 [::mime::initialize  \
	-canonical text/plain \
	-string "Hello, this is a text part"]
set part2 [::mime::initialize -canonical text/plain -file somefilename]

set multipart [::mime::initialize -canonical multipart/mixed \
	 -parts [list $part1 $part2]]

There are lots of ways to set other headers, and you'll need to use
something to generate the base64 or uuencode format.  You can set
the content transfer encoding with the mime package.

>>>[email protected] said:
 > > % echo "send" | \
 > >   forw -mime -form path/to/forwcomps -noedit -file path/to/file
 > > 
 > > Ugly but maybe the ugliness can be hidden away in a script.
 > > 
 > 
 > Ugly... Maybe the Right Thing is to patch the sendfiles(1) command from 
nmh
     to do what we want? Basically add options to not do tar and not do 
partial
      deliveries.
 > 
 > A quick check showed that the mail(1) command did not have a way to add 
head
     ers.so to get the 'Mime-Version: 1.0' header in there something else 
is ne
     eded.
 >  
 > 
 > /A
 > 
 > 
 > _______________________________________________
 > Exmh-workers mailing list
 > [email protected]
 > https://www.redhat.com/mailman/listinfo/exmh-workers
 > 

--
Brent Welch
Software Architect, Panasas Inc
Delivering the premier storage system for scalable Linux clusters

www.panasas.com
[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.