Ok, this kindof works, if I put a wait 10 after I write the file to disk, 
but before I email it, the email comes through fine (granted it takes 10 
seconds longer, but I'm willing to deal with that for now).  The problem 
here is that even though everything works ok, I get a network timeout error. 
  How do I increase the network timeout window?  Or is this a really bad 
approach.
Matt


>From: "Matt MacDonald" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: [REBOL] Re: File writing issue
>Date: Fri, 31 Oct 2003 08:57:43 -0500
>
>
>That makes sense, but how do I email an attachment that is in memory.
>Basically this is the scenario:
>The client software sends a file to the server, this needs to be done using
>read and write commands because FTP is not secure enough.  Then once the
>file gets to the server, the server sends out an email which includes the
>file.  So as far as I can see, the file needs to come from disk and not 
>from
>memory.  I have tried doing a read/binary of the file into a string in
>memory and manually formatting the message body, but it never comes out as
>the attachment in the email, its just always a text file that has all the
>binary in it.
>
>Matt
>
>
>------------------------------------
>I suspect the problem is either in your
>/direct mode handling, or the build attach
>code.
>
>What happens when you do not use /direct mode?
>
>If you write in buffered mode, you have the file
>contents in memory, so you should be able to
>write/binary the file, then send straight from memory.
>
>Also you can read/binary and compare the contents
>in memory.
>
>       contents: read/binary file
>
>       write/binary file2 contents
>       contents2: read/binary file2
>
>       ; compare contents
>       print (checksum contents) = checksum contents2
>
>I know you want to use /direct mode, but until you
>are bug free... divide and conquer.
>
>Anton.
>
> >If the file is there allready it emails fine.  Its just when I do a
> >read/binary/direct from one location and a write/binary/direct
> >from another
> >location and then immediately try to do anything with it that it gives me
> >issues.
> >
> >Matt
> >
> >--------------------------------
> >Hi Matt.
> >
> >If you copy the file manually to the directory, and then attempt to
> >email it using REBOL, do you get correct results?
> >If not, how are you determining how many bytes you are sending out?
> >Does the fiile contain binary data or ascii?
> >Are you emailing it as an attachment, or as the text body?
> >
> >Elan
> >
> >Matt MacDonald wrote:
> >
> > >Ok here's one more for everyone to ponder.  When you write a
> >file in rebol
> > >that is somewhat large (around 1 meg or so) and then immediately after
> > >writing it you want to do something with it (email it, etc) I
> >get an error
> > >message that the file is not there.  On inspection of the
> >directory where
> > >it is supposed to be, it is there.  So I'm guessing there is a
> >little delay
> > >between the time when you write the file (and rebol returns)
> >until the file
> > >is really accessable.  So I put this line of code in to counteract that
> > >
> > >while [not exists? file] []
> > >to make it wait for the file to be there.
> > >
> > >So now I can do things with the file, but not the whole file.
> >When I email
> > >it it usually shows up as 64B.  So then I entered this line of code
> > >while [size? file <> fsize] [] ; where fsize is how big the file
> >should be,
> > >thinking that the file might get written to the disk in peices
> >so I want to
> > >make sure the whole file is there before doing stuff with it.
> >This didn't
> > >work either, it did wait, but the file still doesn't come
> >through complete.
> > >  Any suggestions?
> > >
> > >Matt
>
>_________________________________________________________________
>Fretting that your Hotmail account may expire because you forgot to sign in
>enough? Get Hotmail Extra Storage today!
>http://join.msn.com/?PAGE=features/es
>
>--
>To unsubscribe from this list, just send an email to
>[EMAIL PROTECTED] with unsubscribe as the subject.
>

_________________________________________________________________
Fretting that your Hotmail account may expire because you forgot to sign in 
enough? Get Hotmail Extra Storage today!   
http://join.msn.com/?PAGE=features/es

-- 
To unsubscribe from this list, just send an email to
[EMAIL PROTECTED] with unsubscribe as the subject.

Reply via email to