Script to process MIME enclosures in ELM 
Author Message
 Script to process MIME enclosures in ELM

Well, here it is.  Thanks to Dave S., xtian, and{*filter*} T. for helpful comments.  This script allows
you to pipe elm mail which has MIME enclosures into a MIME decoding
utility.  To run the script, you must download MIME64.ZIP from in the os2/32bit/unix
directory.  When you are viewing the file, you can type "|" and then:


to process the file.  I realize this is really a klunky script, but it's just a first effort.  And it works.  Nice
improvements would be:

        1) Have the script prompt you for an outfile file name (easy to put in)
        2) Get rid of the READY: that is spit out of the program and causes an error,
        even though the program still runs OK (surely simple, I'm a dummy)
        2) Have the script sense whether this is a MIME, UUEncoded, or BinHex enclosure
        (shouldn't be too hard, have the script search for "base64", "uudecode", or "BinHex",
        save the result code in some variable, and use this variable to choose the decoder)
        3) Have the script get the output filename from the piece of mail (harder, since some
        encoders don't include the output filename, and others might include an illegal name
        [e.g. a Mac or Unix long name and the user is on a FAT system]).

========== MIME.CMD ==========

/* === mime.cmd === */
/* try to set up a REXX script to decode MIME enclosures , have to pipe the file into */
/* the script.  The enclosure will contain the BASE64 comment */
/* A MIME decoder for os/2 is available in the Unix subdirectory of most os/2 sites */
do while lines() > 0
        Call LINEOUT 'X:\TEMP\mimefile' , ch
"X:\bin\unixutil\mime64 X:\TEMP\mimefile X:\TEMP\outfile"
"del X:\TEMP\mimefile"

Paul Gronke     Box 90204, 311 Perkins Library
                      Department of Political Science
                      Duke University
                      Durham, NC 27708-0204

Fax:      919-660-4330   Home Page: http://www.*-*-*.com/ ~gronke

Fri, 18 Jul 1997 00:31:31 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Piping ELM mail into REXX script (os/2)

2. POST processing/mime problem

3. MIME type for Ruby scripts?

4. MIME decoding in CGI script

5. Boxes 1, Enclosures 0

6. Transfinite enclosure

7. safe-tcl + metamail + elm

8. ELM and TK

9. X-based/elm-based mail browser using tk

10. Resource for awk scripts for HTML processing?

11. Any Improvements to this process killing script?

12. A script for processing forms in Win95


Powered by phpBB® Forum Software