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

Re: Pop3 Gambas & Gmail.


Well one step closer to the problem i guess.

From what i can tell from looking at the Open command it does not return
any value but it raises errors with Error.Raise() for various things.
https://gitlab.com/gambas/gambas/-/blob/master/comp/src/gb.net.pop3/.src/Pop3Client.class?ref_type=heads#L183

So yes your code is looking better (i would put the error check before
anything else after calling Open though)
And i think the check for Status can be dropped as Open would Error if no
connection is made.

 Try $Pop.Open()
  If Error Then
     Print Error.Text
  Else
     Print "Mensajes: " & $Pop.Stat[0]
  Endif

Respects
BruceS


On Fri, 18 Oct 2024 at 15:36, System64 Development <64xcode@xxxxxxxxx>
wrote:

> El 18/10/24 a las 14:58, Bruce Steers escribió:
> > Did you see my replies Martin?
>
> Hi, Bruce, yes I'm reading your massaages.
>
> I made this code
>
> Public Sub testMail()
>
>    $Pop.Host = "pop.gmail.com"
>    $Pop.port = 995
>    $Pop.User = $User
>    $Pop.Encrypt = Net.SSL
>    $Pop.Password = $Pswd
>
>    Try $Pop.Open()
>    If $Pop.Status = Net.Connected Then
>      Print "Mensajes: " & $Pop.Stat[0]
>    Endif
>
>    If Error Then Print Error.Text
>
> End Sub
>
> I return the error "Cannot authenticate"
>
>
>

References:
Pop3 Gambas & Gmail.System64 Development <64xcode@xxxxxxxxx>
Re: Pop3 Gambas & Gmail.Gianluigi <gradobag@xxxxxxxxxxx>
Re: Pop3 Gambas & Gmail.System64 Development <64xcode@xxxxxxxxx>
Re: Pop3 Gambas & Gmail.Bruce Steers <bsteers4@xxxxxxxxx>
Re: Pop3 Gambas & Gmail.System64 Development <64xcode@xxxxxxxxx>