Android Question I should send an email with google but I find error!

ivanomonti

Expert
Licensed User
Longtime User
i am using this code after updating the library as proposed in a post by @Erel but i have no success

Dim smtpServer As String = "smtp.gmail.com"
Dim smtpPort As Int = 587
Dim smtpUserEmail As String = "[email protected]"
Dim smtpUserPassword As String = "-----------------------------------------------------------"

Dim receipientEmail As String = "[email protected]" ' email client

B4X:
Log("started")
        Dim smtp As SMTP
        smtp.Initialize(smtpServer, smtpPort,smtpUserEmail, smtpUserPassword, "smtp")
        smtp.StartTLSMode = True
        smtp.UseSSL = True
        smtp.Subject = "MIASmart Social AI"
        smtp.Body = "CODE: " & code
        smtp.To.Add(receipientEmail)
        smtp.Send
        Wait For smtp_MessageSent(Success As Boolean)
        Log(Success)
        Log(LastException)
 
Top