PurePOP3 library : POP3 functions

All PureFORM, JaPBe, Libs and useful code maintained by gnozal

Moderator: gnozal

gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Fangbeast wrote:Now getting this error trying to compile.

POLINK: error: Unresolved external symbol '_PB_StringBasePosition'.
POLINK: fatal error: 1 unresolved external(s)
That's weird, I have tested the new lib in standard and threadsafe mode, with PB4.02 and PB4.10b3, and I get no linker error ... (?)
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

No problem here either. I still think fangles has somehow mixed up the libraries etc.
I may look like a mule, but I'm not a complete ass.
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4789
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Post by Fangbeast »

No, I have not and constantly saying that doesn't make it any truer than the last ten times I was told.
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4789
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Post by Fangbeast »

Gnozal, something has been trashed and I don't know why but it could be another lib problem.

THis is he importan tpart: I have been using the previous version of your pop3 lib with Paul's PureVision lib for the past 6 weeks and the compiler was setup for both threadsafe and the threadsafe subsystem and everything worked just fine.

I updated to the latest libs today (yours) and immediately got that POLINK: error.

I then stripped out all of PV designer references and it all worked again.

So what on earth is going on? PV and older POP3 lib worked, updated to the new Pop3lib, get Polink error and then have to strip all of PV code???

I am totally stumped.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Fangbeast wrote:Gnozal, something has been trashed and I don't know why but it could be another lib problem.

THis is he importan tpart: I have been using the previous version of your pop3 lib with Paul's PureVision lib for the past 6 weeks and the compiler was setup for both threadsafe and the threadsafe subsystem and everything worked just fine.

I updated to the latest libs today (yours) and immediately got that POLINK: error.

I then stripped out all of PV designer references and it all worked again.

So what on earth is going on? PV and older POP3 lib worked, updated to the new Pop3lib, get Polink error and then have to strip all of PV code???

I am totally stumped.
Sorry, I don't have PurevisionXP, so I can't test any PV related library. All I can say is that I don't have any linker error with the latest library.
Assuming that you use the PB IDE (I don't know if you can compile from PV), does this error also occur if you compile your source from the command line (PBCOMPILER ...) or jaPBe ?
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4789
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Post by Fangbeast »

Assuming that you use the PB IDE (I don't know if you can compile from PV), does this error also occur if you compile your source from the command line (PBCOMPILER ...) or jaPBe ?
PB IDE. Good idea, I will try it. Thanks for that. I need my PV specific addons, makes it easier to design visual forms.

/me goes and beats up that noisy srod fellow
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4789
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Here is a stupid question..

Post by Fangbeast »

If I use PurePOP3_RetrieveMessage(i, NewMessage.s) (Where I have saved the message to disk, can I still use the

PurePOP3_HeaderFindFirst()
PurePOP3_HeaderFindNext()

commands on it?

Or is the message basically gone from memory now?
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: Here is a stupid question..

Post by gnozal »

Fangbeast wrote:If I use PurePOP3_RetrieveMessage(i, NewMessage.s)
...
is the message basically gone from memory now?
Saving the message by using the optional parameter does not free the memory. The message is there until next PurePOP3_RetrieveMessage() call.
Note that you can get a pointer to this memory area with PurePOP3_GetMessageBufferAddress().
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4789
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Here is a stupid question..

Post by Fangbeast »

gnozal wrote:
Fangbeast wrote:If I use PurePOP3_RetrieveMessage(i, NewMessage.s)
...
is the message basically gone from memory now?
Saving the message by using the optional parameter does not free the memory. The message is there until next PurePOP3_RetrieveMessage() call.
Note that you can get a pointer to this memory area with PurePOP3_GetMessageBufferAddress().
Thanks Gnozal. I don't have much experience with this sort of coding and all of your libs are so very useful. Thanks for all your hard work!!!
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4789
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Post by Fangbeast »

Another question: (The explanation may fix a problem I have)
PurePOP3_Reset()

Reset message transactions.

Returns #PurePOP3_Ok if success (else is error code).
What message transactions exactly? Regards.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Fangbeast wrote:Another question: (The explanation may fix a problem I have)
PurePOP3_Reset()

Reset message transactions.

Returns #PurePOP3_Ok if success (else is error code).
What message transactions exactly? Regards.
This function sends 'RSET' to the POP3 server.

From RFC 1939 ( http://www.ietf.org/rfc/rfc1939.txt ) :

Code: Select all

RSET

         Arguments: none

         Restrictions:
             may only be given in the TRANSACTION state

         Discussion:
             If any messages have been marked as deleted by the POP3
             server, they are unmarked.  The POP3 server then replies
             with a positive response.

         Possible Responses:
             +OK

         Examples:
             C: RSET
             S: +OK maildrop has 2 messages (320 octets)

Code: Select all

The TRANSACTION State

   Once the client has successfully identified itself to the POP3 server
   and the POP3 server has locked and opened the appropriate maildrop,
   the POP3 session is now in the TRANSACTION state.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4789
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Post by Fangbeast »

Thanks. I was looking for some RFC's that would help me with some problems I was having but this isn't it.

I think it's just my ISP doing something. 1 out of the three accounts I have with them goes dead and I have to use their webmail interface to shuffle messages around before I can access them again. Weird. Trying to figure out if I had left out anything in my code that would account for it but haven't:):)
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4789
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Function request.

Post by Fangbeast »

The ability to save attachments is great and works well. Would it be possible to add a function that strips it from the message as well? I keep track of my emails in a database using your lib and have some idiot friends send me some huge attachments.

Would love to strip them from the message after saving if opossible.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: Function request.

Post by gnozal »

Fangbeast wrote:The ability to save attachments is great and works well. Would it be possible to add a function that strips it from the message as well? I keep track of my emails in a database using your lib and have some idiot friends send me some huge attachments.

Would love to strip them from the message after saving if opossible.
What about saving the text only (get the message text with PurePOP3_GetMessageTextInMemory() and save it) ?
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4789
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Function request.

Post by Fangbeast »

gnozal wrote:
Fangbeast wrote:The ability to save attachments is great and works well. Would it be possible to add a function that strips it from the message as well? I keep track of my emails in a database using your lib and have some idiot friends send me some huge attachments.

Would love to strip them from the message after saving if opossible.
What about saving the text only (get the message text with PurePOP3_GetMessageTextInMemory() and save it) ?
I thought of that, but it doesn't preserve the raw .EML mail structure. I know there is a way of doing it all, just escapes me for the moment.

Please excuse all the questions, I have my days when Ia m excited and other days when I can't code:):):)
Post Reply