Attachment has bytes size 0

  1. When the file test.txt reach the receipent, the file size is empty and file size = 0. stream1.bytes also shows 0. Pls advise.

  2. Is ENC_IDENTITY_BINARY applicable for all file type (txt, pdf etc) ?

For Each oCurrentFile In oFileColl

            sb = "c:\test.txt"

             Dim AttachMe As NotesMIMEEntity

             Set AttachMe = body.CreateChildEntity()

             Dim stream1 As NotesStream

             Set stream1 = session.CreateStream()

             Call stream1.Open(sb)

             MsgBox stream1.Bytes

             

             Call AttachMe.SetContentFromBytes

            (stream1, "image/gif;name=""" + "test.txt" + """",

            ENC_IDENTITY_BINARY)

                  

            count = count + 1

            stream1.Close

Next