Sub Process_Globals
Dim SMTP As SMTP
End Sub
Sub Globals
End Sub
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
SMTP.Initialize("smtp-mail.outlook.com", 587, "my@outlook.com", "mypassword", "SMTP")
SMTP.StartTLSMode = True
End If
SMTP.To.Add("othermail@example.com")
SMTP.Subject = "This is the subject"
SMTP.Body = "This is the message body."
'SMTP.AddAttachment(File.DirRootExternal, "somefile")
SMTP.Send
End Sub
Sub SMTP_MessageSent(Success As Boolean)
Log(Success)
If Success Then
ToastMessageShow("Message sent successfully", True)
Else
ToastMessageShow("Error sending message", True)
Log(LastException.Message)
End If
End Sub