Modern-day POP3 access?

Everything else that doesn't fall into one of the other PB categories.
BarryG
Addict
Addict
Posts: 3292
Joined: Thu Apr 18, 2019 8:17 am

Modern-day POP3 access?

Post by BarryG »

Hi all. So, what's the deal these days with POP3 access with PureBasic? All the examples I've tried in these forums don't work anymore (or maybe I did something wrong). Is there a way to reliably do it these days? I use Gmail as my provider so I'd love to see some code that lets me access my emails with them and get the subject, body, and any attachments. IMAP is not an option. Thanks!
Last edited by BarryG on Fri Nov 17, 2023 9:46 am, edited 1 time in total.
User avatar
idle
Always Here
Always Here
Posts: 5042
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Modern-day POP3 access?

Post by idle »

have you looked at infratec's libcurl
viewtopic.php?t=80118
it has imap example but I don't know if it works with gmail
BarryG
Addict
Addict
Posts: 3292
Joined: Thu Apr 18, 2019 8:17 am

Re: Modern-day POP3 access?

Post by BarryG »

I'll check it out, thanks! BTW, edited my first post because I said SMTP instead of IMAP by mistake.

[Edit] Way too complicated for a network newbie like me. Was hoping there'd be a POP3 example in it, but nope. Oh well.
User avatar
mk-soft
Always Here
Always Here
Posts: 5335
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Modern-day POP3 access?

Post by mk-soft »

With GMAIL you must explicitly allow other e-mail programmes.
Only certified e-mail programmes are accepted by default.

You can set this online at GMAIL.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
pamen
Enthusiast
Enthusiast
Posts: 173
Joined: Sat Dec 31, 2022 12:24 pm
Location: Cyprus
Contact:

Re: Modern-day POP3 access?

Post by pamen »

Hi Barry
To do things right is complicated, I just wrote an email client (IMAP(s) / SMTP(s)),
network -better use library like chilkat () - you need support for TLS, Digital signatures, MIME parsing, control of connection count (gmail, outlook356...),
HTML parsing, converting to text, understanding iCal format for emails which are invites, multi-part emails, security (like disabling / removing java script or external images) and lots, lots more.

So - POP3 or IMAP with TLS 1.2/1.3 itself is easy if you use a lib like Chilkat (works for all OS with PureBasic with no issues and is rock solid), but the pains begin afterwards.

I use Chilkat for my professional applications and now tried it with PB on MACOS Intel and M2, Linux and Windows.
Trying to write it yourself - good luck, I wrote once IMAP lib in Java and it took a year to make it right with all the complexities of SSL/TLS.

I'm not affiliated, just very satisfied with the quality of it for all email - related stuff:
https://www.chilkatsoft.com/

You can see a screenshot of the email client (with multiple accounts) here:
https://www.purebasic.fr/english/viewtopic.php?t=83338
S.T.V.B.E.E.V.
Post Reply