Hi every body,
Improving my first app, I'm trying to send by email (via the NET library) the now created text file from the sqlite db.
The file is created (I can see it and read directly into the tablet) but when I try to sent it using the SMTP protocol, it doesn't send it.
Using a Try/Catch I got a success message but the fact is that the email is not sent (and obviously not received).
I tried with several emails but none seems working.
What am I missing?
Thanx
Improving my first app, I'm trying to send by email (via the NET library) the now created text file from the sqlite db.
The file is created (I can see it and read directly into the tablet) but when I try to sent it using the SMTP protocol, it doesn't send it.
Using a Try/Catch I got a success message but the fact is that the email is not sent (and obviously not received).
I tried with several emails but none seems working.
What am I missing?
Thanx
B4X:
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("GenerarArchivoLayout")
If FirstTime Then
'SMTP.Initialize("mail.latbus.com", 587, "[email protected]", "xxxx", "SMTP")
SMTP.Initialize("smtp.gmail.com", 587, "[email protected]", "xxxx", "SMTP")
SMTP.StartTLSMode = True
End If
create_textfile
Try
'SMTP.To.Add("[email protected]")
SMTP.To.Add("[email protected]")
SMTP.Subject = "Prueba de envio de un archivo de texto desde el tablet"
SMTP.Body = "Prueba de envio del archivo de texto desde el tablet."
SMTP.AddAttachment(File.DirRootExternal & "/Encuestas", exportfile)
SMTP.Send
Msgbox("Archivo de texto enviado", "Exito")
Catch
Log("Text file not sent")
End Try
End Sub
Attachments
Last edited: