[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pop3 Gambas & Gmail.


ok, I managed to connect. For this (in gmail) you need to enable 2FA.
Follow this tutorial:

https://opensource.com/article/21/7/gmail-linux-terminal

But it is recommended NOT to enable app password for a personal account.

This code bellow works now:

Public Sub testMail(sType As String)

  $Pop.Debug = True
  $Pop.port = 995
  $Pop.Encrypt = Net.SSL
  $Pop.Host = "pop.gmail.com"
  $Pop.User = $User
  $Pop.Password = $Pswd

  Try $Pop.Open
  If $Pop.Status = Net.Connected Then
    Print Subst(("You have &1 messages"), $Pop.Count)
    Try $Pop.Close
  Endif

  If Error Then Print Error.Text

End Sub




References:
Pop3 Gambas & Gmail.System64 Development <64xcode@xxxxxxxxx>