Android Question Why is SMTP send is not working?

incendio

Well-Known Member
Licensed User
Longtime User
Hi guys,

I have these codes
B4X:
Sub Process_Globals
    Dim Sm As SMTP
End Sub

Sub Globals
    Dim P2 As Phone
End Sub

Sub Activity_Create(FirstTime As Boolean)
    Activity.LoadLayout("1")
    If FirstTime Then
        Sm.Initialize( "smtp.gmail.com", 587, "[email protected]", "mypass", "SM")
          Sm.StartTLSMode = True
        Sm.UseSSL = True
    End If
  

End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub


Sub SM_MessageSent(Success As Boolean)
      If(Success) Then
        Msgbox("Ok","")
    Else
        Msgbox("not ok","")
    End If
End Sub
      
      
Sub Button_Click
    Sm.To.Add("[email protected]")
    Sm.Subject = "This is a test"
    Sm.Body = P2.GetSettings( "android_id")  
    Sm.Send
End Sub

I got the message Ok, but no email received. (Net ver 1.52, Phone ver 2.20)

Sender email : [email protected] is a new created gmail account, just for testing.
If I change sender email to my old gmail account, it worked ok.

Am i missing something here?
 
Last edited:
Top