Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
2.7k views
in .NET FTP by
Hi,

When I stream a text file as an attachment, the result is an
email with an incomplete attachment. Is there something
wrong with the code below? Thanks.


Dim iosStream As New System.IO.MemoryStream
Dim iosStream2 As System.IO.Stream
Dim sWriter As System.IO.StreamWriter = New System.IO.StreamWriter(iosStream)
sWriter.Write(myAttach.txtData)
iosStream.Position = 0
Dim test As New OpenSmtp.Mail.Attachment(iosStream, myAttach.FileName)
.AddAttachment(test)

1 Answer

0 votes
by (162k points)
Sorry, we can only deal with FTP questions here.

Hi,

When I stream a text file as an attachment, the result is an
email with an incomplete attachment. Is there something
wrong with the code below? Thanks.

Categories

...