[Gambas-user] Receiving an email

Rolf-Werner Eilert eilert-sprachen at ...221...
Tue Jul 30 00:16:05 CEST 2013


Thanks a lot for all the good advice. In the end, it turned out that it 
was only the option to expect mails with more than line which was 
missing, i. e. a mere TRUE.

Everything is running great now!

Rolf


Am 26.07.2013 23:04, schrieb Randall Morgan:
> Yes, Benoit is right.
>
> I just did a quick demo to get you started. I used explicit commands
> because there are times you may need to do this. But the GB docs layout
> everything else. So read the docs and experiment. Also read the info on the
> two sites I linked to so that you have an understanding of what GB is doing
> for you and what to do when GB doesn't provide a solution to your needs.
>
>
>
>
> On Fri, Jul 26, 2013 at 1:38 PM, Benoît Minisini <
> gambas at ...1...> wrote:
>
>> Le 26/07/2013 20:58, Sprachschule Eilert a écrit :
>>> Hi Randall,
>>>
>>> I now got the gb.net.pop3 component to work, and your example works too.
>>> However, I only receive the message headers, not the message bodies, and
>>> the messages aren't downloaded and deleted from the server.
>>>
>>> This is what I got, when there were 3 messages in the inbox:
>>>
>>> Connected to mail server....
>>> +OK Hello there. <29021.1374864315 at ...37...>
>>> There are 3 Messages in your inbox.
>>> You inbox contains 7501 bytes of data.
>>> 1 802
>>> 2 5581
>>> 3 1118
>>> Message: 1 802
>>>
>>> ----------------------------------------------------
>>> +OK 802 octets follow.
>>>
>>>
>>> Message: 2 5581
>>>
>>> ----------------------------------------------------
>>> Received: (qmail 28836 invoked from network); 26 Jul 2013 19:35:08 +0200
>>>
>>>
>>> Message: 3 1118
>>>
>>> ----------------------------------------------------
>>> Received: from 95.58.25.201.megaline.telecom.kz (HELO 95.58.25.201)
>>> (95.58.25.201)
>>>
>>>
>>> Closing Connection.
>>>
>>>
>>> As soon as I know how to get complete messages (in my case, these would
>>> be the contact forms sent by customers via the contact form tool on my
>>> website), I would add the DELE command to clean them from the server.
>>>
>>> Rolf
>>>
>>
>> You don't have to issue the POP3 commands explicitely with the
>> Pop3Client class. Look at the documentation:
>>
>> hConn.Count returns the number of messages.
>>
>> hConn[i] returns the i-th message.
>>
>> hConn[i].Size returns the message size.
>>
>> hConn[i].Text returns the message contents "as is".
>>
>> hConn[i].Message returns the message parsed as a MimeMessage object.
>>
>> hConn[i].Delete marks the message as being deleted. It will be actually
>> deleted when you call hConn.Close(), but not if you call hConn.Abort().
>>
>> Then go look at the MimeMessage class documentation of gb.mime!
>>
>> Regards,
>>
>> --
>> Benoît Minisini
>>
>>
>> ------------------------------------------------------------------------------
>> See everything from the browser to the database with AppDynamics
>> Get end-to-end visibility with application monitoring from AppDynamics
>> Isolate bottlenecks and diagnose root cause in seconds.
>> Start your free trial of AppDynamics Pro today!
>> http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Gambas-user mailing list
>> Gambas-user at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
>
>
>




More information about the User mailing list