Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Private smtpClient As SMTP
Private mTimer As Timer
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
If FirstTime Then
smtpClient.Initialize("smtp.gmail.com", 587, "xxx@gmail.com", "xxx", "SmtpClient")
smtpClient.StartTLSMode = True
End If
mTimer.Initialize("mTimer",60000)
mTimer.Enabled = True
End Sub
Sub mTimer_Tick
smtpClient.To.Add("eurojam@web.de")
smtpClient.Subject = "Title"
smtpClient.Body = "Variable1=Test1, Variable2=Test2"
smtpClient.Send
End Sub
Sub SmtpClient_MessageSent(Success As Boolean)
If Success Then
Log(" gesendet um " & DateTime.Time(DateTime.Now))
mTimer.Enabled = False
Else
Log(" nicht gesendet....versuche es in 60 sekunden wieder")
Log(LastException.Message)
End If
End Sub