Hi, I've been trying to create an app that takes a screenshot and sends an email with it attached. When I click send i seems not to do anything, even though I have a message of "message was not sent", which is not showing and the message is not sending. Does anyone have a suggestion?
here is my code.
Sub Send_Click
Dim result As Int
Msgbox2("You are about to send an email to My@email.com. Are you sure you want to do this?", "Attention","Yes","","No",Null)
If result = DialogResponse.positive Then
SMTP.Initialize("mail.server.com",25, "my@email.com", "xxxx", "SMTP")
SMTP.To.Add("my@email.com")
SMTP.Subject = "Subject Line"
SMTP.Body = Name.Text AND Company.Text AND PhoneNum.Text AND Email.Text AND AddInfo.Text
SMTP.AddAttachment(File.DirRootExternal, "Image.png")
SMTP.Send
Else If result = DialogResponse.NEGATIVE Then
Return
End If
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
here is my code.
Sub Send_Click
Dim result As Int
Msgbox2("You are about to send an email to My@email.com. Are you sure you want to do this?", "Attention","Yes","","No",Null)
If result = DialogResponse.positive Then
SMTP.Initialize("mail.server.com",25, "my@email.com", "xxxx", "SMTP")
SMTP.To.Add("my@email.com")
SMTP.Subject = "Subject Line"
SMTP.Body = Name.Text AND Company.Text AND PhoneNum.Text AND Email.Text AND AddInfo.Text
SMTP.AddAttachment(File.DirRootExternal, "Image.png")
SMTP.Send
Else If result = DialogResponse.NEGATIVE Then
Return
End If
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