Private Sub btnSendEmail_Click
Wait For (FileHandler1.Load("*/*", "Choose file")) Complete (Result1 As LoadResult)
If Result1.Success Then
Private fDir, fName As String
fName = Result1.FileName
fDir = Result1.Dir
SMTP1.To.Add("example@gmail.com")
SMTP1.Subject = SSSSS"
SMTP1.Body = "bbbbb"
SMTP1.AddAttachment(fDir, fName)
SMTP1.Send
End If
Sub SMTP1_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