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, "luisfelipe@latbus.com", "xxxx", "SMTP")
SMTP.Initialize("smtp.gmail.com", 587, "louesfera@gmail.com", "xxxx", "SMTP")
SMTP.StartTLSMode = True
End If
create_textfile
Try
'SMTP.To.Add("infor@latbus.com")
SMTP.To.Add("lp.tramier@gmail.com")
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