[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gambas-user
Subject:    Re: [Gambas-user] Receiving an email
From:       Rolf-Werner Eilert <eilert-sprachen () t-online ! de>
Date:       2013-07-29 22:20:07
Message-ID: 51F6EA97.2080003 () t-online ! de
[Download RAW message or body]



Am 26.07.2013 22:38, schrieb Benoît Minisini:
> 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@localhost.localdomain>
>> 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,
>


I found the reason why Randall's example didn't work like expected: The 
option for mails with more than line was missing.

Nevertheless, interesting tipps you had here for me, I'll keep gb.mime 
in mind.

And thanks for 3.4.2, running perfectly on my laptop!

Regards
Rolf

------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic