Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim m As SMTP
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim mypass As String ="mypass"
Dim mymail As String ="mymail"
Private Button1 As Button
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("1")
m.Initialize("smtp.office365.com",587,mymail,mypass,"mail") 'office 365 not working
'm.Initialize("smtp.live.com",587,mymail,mypas,"mail") 'hotmail this works
m.StartTLSMode=True
' have tried all below, no change
'm.UseSSL=True
'm.AuthMethod=m.AUTH_CRAM_MD5
'm.AuthMethod=m.AUTH_LOGIN
'm.AuthMethod=m.AUTH_PLAIN
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub mail_MessageSent(Success As Boolean)
If Success Then
ToastMessageShow("Message sent successfully", True)
Log("Mail sent ok")
Else
ToastMessageShow(LastException.Message, True)
Log(LastException.Message)
End If
End Sub
Sub sendmail
m.To.add("some@mail.com") '
m.Body=("Test SMTP")
m.Subject=("Test SMTP")
m.send
Log("Mail sent?")
End Sub
Sub Button1_Click
sendmail
End Sub