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

Re: Pop3 Gambas & Gmail.


I'd try this way Martin.

   Try $Pop.Open()  ' A few things in the Open method can Raise/Throw an
error so use Try
   If $Pop.Status = Net.Connected Then
     Print "Mensajes: " & $Pop.Stat[0] ' Messages numbers.
   Endif


Respects
BruceS

On Fri, 18 Oct 2024 at 12:53, Bruce Steers <bsteers4@xxxxxxxxx> wrote:

> Hmm , studying the Pop3Client code I cannot see any return for Open.
>
> It says Open() As Boolean  but nowhere in the Open function is a Return
> True or False statement so i guess it's ALWAYS false.
> Maybe you should check the .Status after calling open?
>
> Respects
> BruceS
>
>
> On Fri, 18 Oct 2024 at 12:47, Bruce Steers <bsteers4@xxxxxxxxx> wrote:
>
>> Does Pop3Client.Open return an error like Dialog.OpenFile ? So if true it
>> means failed ?
>> Everything else looks correct.
>>
>> try..
>>
>> If Not $Pop.Open() then
>>      Print "Mensajes: " & $Pop.Stat[0] ' Messages numbers.
>> Endif
>>
>> On Fri, 18 Oct 2024 at 09:43, System64 Development <64xcode@xxxxxxxxx>
>> wrote:
>>
>>> Hi,
>>>
>>> I use this code to connect to a Gmail mailbox
>>>
>>>    $Pop = New Pop3Client
>>>    $Pop.Host = "pop.gmail.com"
>>>    $Pop.port = 995
>>>    $Pop.User = "myname@xxxxxxxxx"
>>>    $Pop.Encrypt = True
>>>    $Pop.Password = "mypassword"
>>>    If $Pop.Open() Then
>>>      Print "Mensajes: " & $Pop.Stat[0] ' Messages numbers.
>>>    Endif
>>>
>>> But doesn't work.
>>>
>>> ¿Is due to Gimail or perhaps the code is wrong?
>>>
>>> Im trying to made a program that:
>>>
>>> Read each messages from the mailbox
>>>
>>> Process the all the mails and create a pdf file for each one.
>>>
>>> Answer to all the "emailunique/senders" adding one attachment
>>>
>>> Martin.
>>>
>>>
>>>

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