Sub Class_Globals
Private Root As B4XView
Private xui As XUI
Dim SMTP As SMTP
End Sub
Public Sub Initialize
' B4XPages.GetManager.LogEvents = True
SMTP.Initialize("smtp.office365.com", 587, "the_username","the_password","SMTPevent")
SMTP.UseSSL = False
SMTP.StartTLSMode = True
End Sub
'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.LoadLayout("MainPage")
End Sub
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
Sub CreateEMail
SMTP.AuthMethod=SMTP.AUTH_LOGIN
SMTP.To.Add("[email protected]")
SMTP.Subject = "Testing SMTP Issue"
SMTP.Body = "Testing the email send issue"
SMTP.Send
End Sub
Private Sub Button1_Click
CreateEMail
End Sub