Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These variables can only be accessed from this module.
Dim StatusSend1 As String
Dim SMTP As SMTP
StatusSend1=""
Private Button1 As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
SMTP.Initialize
Activity.LoadLayout("3")
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub EnviarEMail1
SMTP.Initialize("smtp.gmail.com", 465, "tawdawd3@gmail.com", "awdawd", "SMTP")
SMTP.UseSSL = True
SMTP.To.Add("awdawdawd@gmail.com")
SMTP.Subject = "Asunto del Email"
SMTP.Body = "Cuerpo del mensaje."
SMTP.AddAttachment(File.DirRootExternal, "elarchivoquequeremosadjuntar")
SMTP.Send
End Sub
Sub SMTP_MessageSent(Success As Boolean)
If Success=True Then StatusSend1="SI enviado"
If Success=False Then StatusSend1="NO Enviado"
Log(StatusSend1)
End Sub
Sub Button1_Click
EnviarEMail1
End Sub
[ /code ]