PurePOP3 library : POP3 functions
Moderator: gnozal
-
- Enthusiast
- Posts: 125
- Joined: Sat Jun 17, 2006 3:15 pm
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
No...::Origin::.. wrote:Apologies for the old topic bump, but is there a way to use this with GMAIL?
Gmail does not use 'standard POP3', but SSL.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Hi gnozal.
Have some trouble with the POP lib. probably my fault, but anyways, you can probably help
I have 3 email messages on my pop account, but when I run this code:it is supposed to save the email messages to files but that only happens for the two first files it seems. It counts all three messages with PurePOP3_CountMessages() and it displays the messages in the debug window, but it only saves Email-1.txt and Email-2.txt to disk, there is no Email-3.txt can you spot any errors I may have made here?
Have some trouble with the POP lib. probably my fault, but anyways, you can probably help
I have 3 email messages on my pop account, but when I run this code:
Code: Select all
Messages = PurePOP3_CountMessages()
Debug "You have " + Str(Messages) + " messages(s)"
If Messages
For i=0 To Messages
PurePOP3_RetrieveMessage(i, "E:\Email-"+Str(i)+".txt")
Debug "Message info : " + PurePOP3_GetMessageInfo()
*Message = PurePOP3_GetMessageTextInMemory()
If *Message
Debug "Message text : " + PeekS(*Message)
FreeMemory(*Message)
EndIf
Debug "---------------------------------"
Next i
EndIf
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
Code: Select all
If Messages
For i=0 To Messages
PurePOP3_RetrieveMessage(i, "E:\Email-"+Str(i)+".txt")
Don't know if that works, but might help.
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
I can't test it now (no POP3 server) but IIRC I always used where i is the message number (can't be 0 I think).
Code: Select all
For i = 1 To Messages
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Please :GeoTrail wrote:I have tried with both 0 and 1 and there doesn't seem to be any difference. I get the same result. And I don't get any error messages.
- post a complete code snippet
- enable the trace mode [ PurePOP3_Trace(#True) ] and post the PurePOP3-DEBUG*.txt files [replace your password with XXX

For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
The source is the source from the help file that I modified alittle
It does seem to work now though. I had 5 email messages on the server and it now creates 5 email files. Could there be something wrong with the pop server?
Code: Select all
PurePOP3_Trace(#True)
If PurePOP3_OpenPOP3Connection("pop.online.no", 110, "USER", "PASSWRD") = #PurePOP3_Ok
Debug "Connected"
Messages = PurePOP3_CountMessages()
Debug "You have " + Str(Messages) + " messages(s)"
If Messages
For i=0 To Messages
PurePOP3_RetrieveMessage(i, "E:\Email-"+Str(i)+".txt")
Debug "Message info : " + PurePOP3_GetMessageInfo()
*Message = PurePOP3_GetMessageTextInMemory()
If *Message
Debug "Message text : " + PeekS(*Message)
FreeMemory(*Message)
EndIf
Debug "---------------------------------"
Next i
EndIf
PurePOP3_ClosePOP3Connection()
Else
Debug PurePOP3_GetLastServerMessage()
EndIf
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
GoodGeoTrail wrote:It does seem to work now though. I had 5 email messages on the server and it now creates 5 email files.

Could be, that's why I asked for the log files. I have the impression that POP3 is a very non standard standard ! I had a lot of surprises with different servers.GeoTrail wrote: Could there be something wrong with the pop server?
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
@gnozal:
I tried to download your POP3 User Lib but I always get the following warning from our SonicWall appliance:
Or is this definitely a false positive warning?
I tried to download your POP3 User Lib but I always get the following warning from our SonicWall appliance:
Would you please be so kind and do a virus test on your PurePOP3 PB 4 zip archive http://freenet-homepage.de/gnozal/PurePOP3_.zip to make sure that it doesn't contain the above mentioned worm?This request is blocked by the SonicWALL Gateway Anti-Virus Service. Name: Suspicious.2#upack (Worm)
Or is this definitely a false positive warning?
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
It is a false positive. The SFX is packed with WinUpack, hence the virus warning.Shardik wrote:Would you please be so kind and do a virus test on your PurePOP3 PB 4 zip archive http://freenet-homepage.de/gnozal/PurePOP3_.zip to make sure that it doesn't contain the above mentioned worm?
Or is this definitely a false positive warning?
Still, if you have any doubt, you can open PurePOP3-Installer.exe in your favorite packer (WinRAR, 7-ZIP, etc..) like a ZIP archive and manually extract the files without starting the exe itself.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
@jpd and gnozal
Thank you for your fast replies!

Thank you for your fast replies!
My first try to download the file was successful. But when opening the archive, WinZip reported that the archive is not valid or corrupted. Therefore I retried the download several times and always received the above warning and SonicWALL refused to permit the download again. But I will retry the download when arriving at home in the evening because I don't have the administrative rights to disable the SonicWALL at work.gnozal wrote: Still, if you have any doubt, you can open PurePOP3-Installer.exe in your favorite packer (WinRAR, 7-ZIP, etc..) like a ZIP archive and manually extract the files without starting the exe itself.

-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Update (Both versions)
- some internal changes in PurePOP3_RetrieveMessage()
- added POP3 server time out, to avoid infinite loops
- new function PurePOP3_SetTimeOut()
- some internal changes in PurePOP3_RetrieveMessage()
- added POP3 server time out, to avoid infinite loops
- new function PurePOP3_SetTimeOut()
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).