Simple POP email reader? lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- HatForCat · 2019-11-26 14:55 Hello, I am looking for some sample code for a simple POP3 email reader. I have a few online accounts that send an OTP (One Time Password) to to verify it's me. If we are watching a movie and the feed suddenly decides it needs to verify, I have to go up to the office, fire up my main PC and load the email system and check for emails, memorize the code and go back down and enter it. I'd like a minimalist POP reader I can put on the Home Theater PC and double-click the icon for it to get just the emails for some hard- coded sites and display the contents. Can someone please point me at some sample code? I feel sure there must be some example programs out there but my searching so far, has returned nothing helpful. ---------------------------------------------------------------------- sstvmaster · 2019-11-26 19:17 Hmm, install Thunderbird? This is simple. ---------------------------------------------------------------------- winni · 2019-11-26 20:17 Hi! Don't make it too complicated. Install a VNC-Server on your main PC. Install a VNC-Client on your Theater PC. Done.  On the most Linux distros there is VNC software. But it also work with windows. Winni ---------------------------------------------------------------------- HatForCat · 2019-11-26 22:52 Quote from: winni on November 26, 2019, 09:17:58 pmDon't make it too complicated. Exactly and you guys so far haven't got the gist of a single click idea. I don't want to leave my main PC running all the time just to VNC into it. Which, by the way I could already do. But, even if I did I would still have to go through the loading email client, requesting emails and closing it after memorizing the OTP etc. I want a small POP3 system that when I double click the icon it opens/runs connects to my email ISP-server downloads only the specific email account emails. displays the first line of all emails downloaded. I memorize the OTP Waits 2-minutes then closes itself. In that time I have entered the OTP into the feed request and everyone is happy. It's called automation! By the time I created the OP and now explained this all so far I could have written the thing. I give up. ---------------------------------------------------------------------- winni · 2019-11-26 23:07 There is no reply I think because the people don't understand why you want a complicated solution but you could do a simple one. If you want a pop3 client there are no simple solutions that I know. The most of the pop3 clients use either Indy or Synapse. There are enough examples around. Winni ---------------------------------------------------------------------- ASBzone · 2019-11-27 03:01 Quote from: winni on November 27, 2019, 12:07:08 amThere is no reply I think because the people don't understand why you want a complicated solution but you could do a simple one. ---------------------------------------------------------------------- valdir.marcos · 2019-11-27 05:14 Quote from: HatForCat on November 26, 2019, 03:55:19 pmHello, I am looking for some sample code for a simple POP3 email reader. I have a few online accounts that send an OTP (One Time Password) to to verify it's me. If we are watching a movie and the feed suddenly decides it needs to verify, I have to go up to the office, fire up my main PC and load the email system and check for emails, memorize the code and go back down and enter it. I'd like a minimalist POP reader I can put on the Home Theater PC and double-click the icon for it to get just the emails for some hard- coded sites and display the contents. Can someone please point me at some sample code? I feel sure there must be some example programs out there but my searching so far, has returned nothing helpful. Quote from: HatForCat on November 26, 2019, 11:52:08 pmQuote from: winni on November 26, 2019, 09:17:58 pmDon't make it too complicated.Exactly and you guys so far haven't got the gist of a single click idea. I don't want to leave my main PC running all the time just to VNC into it. Which, by the way I could already do. But, even if I did I would still have to go through the loading email client, requesting emails and closing it after memorizing the OTP etc. I want a small POP3 system that when I double click the icon it opens/runs connects to my email ISP-server downloads only the specific email account emails. displays the first line of all emails downloaded. I memorize the OTP Waits 2-minutes then closes itself. In that time I have entered the OTP into the feed request and everyone is happy. It's called automation! By the time I created the OP and now explained this all so far I could have written the thing. I give up.Here's all the information you need to build yourself your own "simple POP3 email reader": Quote from: Thaddy on August 01, 2016, 05:12:49 pmI am not a parott that repeats documentation. Both Indy and Synapse have examples and documentation. Four letter acromym that starts with R and ends with M. But here you go, your laziness (don't EVER ask such questions again without at least a google attempt by yourself): A synapse example with attachment: http://stackoverflow.com/questions/6765008/send-an-email-with- attachment-client-agnostic Which is better to use INDY 10 or Synapse? https://forum.lazarus.freepascal.org/index.php/topic,33554.msg217635.h tml#msg217635 http://synapse.ararat.cz/doku.php/public:howto:pop3samplessl POP3 SSL with Synapse https://forum.lazarus.freepascal.org/index.php/topic,29515.0.html Synapse reading pop3 mail in UTF-8 - Solved https://forum.lazarus.freepascal.org/index.php/topic,31969.0.html Synapse POP3, SLL and disaster strikes https://forum.lazarus.freepascal.org/index.php/topic,20410.0.html Synapse, OAuth2, Imap & Gmail https://forum.lazarus.freepascal.org/index.php/topic,44007.0.html Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i // How To Use POP3 with SSL// http://synapse.ararat.cz/doku.php/public:howto:pop3samplessl  uses  blcksock, smtpsend, pop3send, ssl_openssl,//... type  ESMTP = class (Exception);  EPOP3 = class (Exception); //... procedure TForm1.edReceiveClick(Sender: TObject);var  pop3: TPOP3Send;  i: integer;begin  pop3 := TPOP3Send.Create();  try    pop3.AutoTLS := false;    pop3.Username:='test';    pop3.Password:='*****';    pop3.TargetHost:='127.0.0.1';    pop3.TargetPort := '995';    pop3.FullSSL := true;    pop3.Sock.SSL.SSLType := LT_SSLv3;     pop3.Sock.SSLDoConnect();    if not pop3.Login() then      raise EPOP3.Create('POP3 ERROR: Login');     AddToLog('POP3 Stat');    if not pop3.Stat() then      raise EPOP3.Create('POP3 ERROR: stat');    AddToLog('Stat: '+IntToStr(pop3.StatCount)+' msgs');    for i := 1 to pop3.StatCount do begin      AddToLog('POP3 Retr(' + IntToStr(i) + ')');      if not pop3.Retr(i) then        raise EPOP3.Create('POP3 ERROR: retr(' + IntToStr(i) + ')');      RichEdit2.lines.Add(' ');    RichEdit2.lines.Add('*** POP3 Retr(' + IntToStr(i) + ') *******');    RichEdit2.lines.AddStrings(pop3.FullResult);      pop3.FullResult.SaveToFile('mail_' + IntToStr(i) + '.msg');      if not pop3.Dele(i) then        raise EPOP3.Create('POP3 ERROR: dele(' + IntToStr(i) + ')');    end;   finally    pop3.Free;  end;end; ---------------------------------------------------------------------- PascalDragon · 2019-11-27 08:10 Quote from: winni on November 27, 2019, 12:07:08 amThere is no reply I think because the people don't understand why you want a complicated solution but you could do a simple one. It might not be a simple idea to implement something like this, but the end result would be convenient. And that's what counts. ---------------------------------------------------------------------- krexon · 2019-11-27 08:40 Quote from: valdir.marcos on November 27, 2019, 06:14:54 amCode: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i     pop3.Sock.SSL.SSLType := LT_SSLv3;Don't use SSLv3, it's insecure. ---------------------------------------------------------------------- Remy Lebeau · 2019-11-27 18:46 Quote from: HatForCat on November 26, 2019, 03:55:19 pmIf we are watching a movie and the feed suddenly decides it needs to verify, I have to go up to the office, fire up my main PC and load the email system and check for emails, memorize the code and go back down and enter it. Um, why not simply have your email on a cell phone or tablet, and then keep that device handy nearby while watching the movie?  Or, there are plenty of 3rd party low-overhead POP3/IMAP checkers available (shameless plug: I used to use MailCheck myself - http://remy.lebeausoftware.org in the "Files" section - which was made by a friend of a friend). The simplest solution is one that doesn't require any coding at all ---------------------------------------------------------------------- Blade · 2021-06-04 06:05 Interesting that nobody knew about this, but there is an e-mail notifier and previewer, that can also be configured to launch a more dedicated e-mail client of a person's choosing.  The source of the program has both Lazarus and Delphi versions. https://sourceforge.net/projects/poptrayu/ (PoptrayU) ---------------------------------------------------------------------- MarkMLl · 2021-06-04 07:52 Quote from: Remy Lebeau on November 27, 2019, 07:46:57 pmUm, why not simply have your email on a cell phone or tablet, and then keep that device handy A throwaway gmail account with notifications on an Android 'phone is ideal for this, even for the most paranoid: use it for nothing except short-lived activation codes and Google (and their associates) will glean nothing about you that they don't know already. MarkMLl ---------------------------------------------------------------------- marcov · 2021-06-04 08:28 OpenXP ? https://sourceforge.net/projects/openxp5/ ---------------------------------------------------------------------- Blade · 2021-06-04 09:25 Quote from: marcov on June 04, 2021, 10:28:41 amOpenXP ? Nice find, and Object Pascal source. ---------------------------------------------------------------------- Blade · 2021-06-04 10:38 Quote from: Remy Lebeau on November 27, 2019, 07:46:57 pmOr, there are plenty of 3rd party low-overhead POP3/IMAP checkers available (shameless plug: I used to use MailCheck myself - http://remy.lebeausoftware.org in the "Files" section - which was made by a friend of a friend). The thing about MailCheck is it doesn't appear to show any source code, to include its history is nebulous.  When it comes to privacy and e-mail there is an obvious additional level of concern about security involved.