Take another look at the detach function.  It expects the wohle email
message as text, including all the headers and everything.  If you
already have the imported email object, you should be able to change
the top of the detach func to look like this:

detach: func [
    {Takes in the whole email text and returns a block of filenames
    and decoded base64 attachments present in the email}
    mail [object!]
][
    headers: mail
    print "Starting decoding process..."
    boundary: headers/content-type

.. rest of script...

and then call 'detach msg'

Sterling

> I am trying to detach an attachment (.jpg image) from an e-mail using the 
> script detach.r from the REBOL script library. Unfortunately, I am getting an 
> error, as follows...
> 
> >> detach msg/content
> starting decoding process...
> ** Script Error: find expected series argument of type
> : series port bitset.
> ** Where: if boundary: find/tail boundary {boundary="}
> 
> In the 'msg/content, there is no {boundary="} statement. Instead, there is a {--
> Message-Boundary-11825} statement.
> 
> My question is: Is my Pegasus e-mail client sending some non-standard 
> "boundary" indicator? Is there any way to set this up so that the script will 
> work with most e-mail clients?
> 
> I can't find any other information in the REBOL docs or examples about 
> detaching e-mail attachments.
> 
> Thanks. Detailed msg/content and detach.r script information follows...
> 
> The msg/content looks as follows...
> 

<cut out the rest>

Reply via email to