Dear all,
I try to send email with two text files as attachements.
The second is 2,35 kb and comes with garbled characters.
The issue always happens at the same position in the text file and onward. I have attached the file to the thread. The file is created correctly in the android device.
I've created the following program to test it. The file has arrived successfully.
B4X:
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim sm As SMTP
End Sub
Sub Globals
End Sub
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
sm.Initialize("xxx", ... , "sm")
End If
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Click
sm.AddAttachment(File.DirAssets, "20121114151502os2.txt")
sm.Body = "test"
sm.To.Add("xxx@xxx.com")
sm.Send
End Sub
Sub SM_MessageSent(Success As Boolean)
Log(Success)
End Sub
The mail server is doing it. Strange that if i send the attached files to a gmail account and then forward them to the original destination which goes through the mail server, the attachements arrive OK. But if I send them directly from the device to the original destination, the attachements are crippled...
Go figure...
So, I think it has nothing to do with the library, so.. case closed.
Thank you!