Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: null character
With a hex editor, I found that immediately following the line it does send is:
00 0D 0A 00 0D 0A(space, CRLF, space, CRLF - I think)
By taking the spaces out, the whole file goes. Does winbatch think it's the EOF when it sees that pattern?
00 0D 0A 00 0D 0A(*NULL*, CRLF, *NULL*, CRLF - I think).
(Space is a 20 )
The *NULL* signifies end of data. Its considered binary information making it a non-text file and beyond the capability of the SMTP function.
Presumably you could "massage" the file prior to email to remove the null characters. How big is the file? For not-too-big files you could add this code....
*NOTE: TOTALLY UNDEBUGGED*
fn="C:\temp\yourbackup.log" fs=FileSize(fn) bb=BinaryAlloc(fs) BinaryRead(bb,fn) fsX=fs-1 for xx=0 to fsX byte=BinaryPeek(bb,xx) if byte==0 then BinaryPoke(bb,xx,32) next BinaryWrite(bb,fn) BinaryFree(bb) ;Now do the SMTP stuffNote 32 decimal == hex 20 == ascii space
Article ID: W12741
Filename: Using BinaryPeek to Find Null 00 Character.txt
File Created: 1999:04:15:16:49:18
Last Updated: 1999:04:15:16:49:18