Page 1 of 1

Modern-day POP3 access?

Posted: Thu Nov 16, 2023 10:17 pm
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!

Re: Modern-day POP3 access?

Posted: Fri Nov 17, 2023 3:29 am
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

Re: Modern-day POP3 access?

Posted: Fri Nov 17, 2023 9:51 am
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.

Re: Modern-day POP3 access?

Posted: Mon Dec 18, 2023 11:17 am
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.

Re: Modern-day POP3 access?

Posted: Wed Feb 14, 2024 8:48 am
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