AntonioCuomo Posted January 29, 2022 Share Posted January 29, 2022 I would like to insert in unigui a client to download e-mails and manage the content of messages. I had thought of using IDPop3 but I can't find examples on the net. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 29, 2022 Share Posted January 29, 2022 42 minutes ago, AntonioCuomo said: I would like to insert in unigui a client to download e-mails and manage the content of messages. I had thought of using IDPop3 but I can't find examples on the net. Hello, Sorry, it's not very clear what you want. Quote Link to comment Share on other sites More sharing options...
AntonioCuomo Posted January 29, 2022 Author Share Posted January 29, 2022 I would like to download the emails in a unigui application so that I can read the content and perform processing on the content or attached files Quote Link to comment Share on other sites More sharing options...
likemike Posted January 30, 2022 Share Posted January 30, 2022 I suggest to use Clever Internet Suite. Works good with UniGui. There comes a lot of examples with this components. Quote Link to comment Share on other sites More sharing options...
x11 Posted January 30, 2022 Share Posted January 30, 2022 https://www.google.com/search?q=delphi+indy+email Quote Link to comment Share on other sites More sharing options...
AntonioCuomo Posted January 30, 2022 Author Share Posted January 30, 2022 I want to download emails not send them. I adapted VCL demo of IPWpop3 in unigui. I can read the list of emails but not the text of the message. Quote Link to comment Share on other sites More sharing options...
AntonioCuomo Posted January 30, 2022 Author Share Posted January 30, 2022 I attach screenshots of the ipwpop3 demo version of n / software and of the unigui app. What I found is that the MESSAGETEXT property in unigui is truncated to the displayed text while in vcl it is a text containing all the message information. doubt: n / sotware Tipwpop3 is compatible with unigui? _MailClient.zip Quote Link to comment Share on other sites More sharing options...
AntonioCuomo Posted January 30, 2022 Author Share Posted January 30, 2022 P.S.: test for unigui Quote Link to comment Share on other sites More sharing options...
AntonioCuomo Posted January 31, 2022 Author Share Posted January 31, 2022 I have the impression that the problem is in these lines of Tipwpop3: function TipwPOP.get_MessageText: String; var tmp: Pointer; begin result := ''; if @_IPWorks_POP_Get = nil then exit; tmp := _IPWorks_POP_Get(m_ctl, PID_POP_MessageText{$IFDEF UNICODE}+10000{$ENDIF}, 0, nil, nil); result := PChar(tmp); end; in the VCL version, result contains the complete string while in unigui only the first part (about 50 characters). It seems that unigui doesn't recognize {$ IFDEF UNICODE} +10000 {$ ENDIF}. I should try to modify the IpWork library. Is it a problem of unigui? In previous posts I have attached a test in unigui. Apart from my specific use, such an application would allow the mail client to be centralized on a single server. Quote Link to comment Share on other sites More sharing options...
Ron Posted February 1, 2022 Share Posted February 1, 2022 It is working fine with Indy POP3, got over 8000 characters in one message while testing against Google Mail. //Message: TListView component set at vsReport procedure TmainForm.ReadEmails; var IDmessage: TIdMessage; i: Integer; begin try with POP3 do begin AutoLogin := False; Host := 'pop.gmail.com'; Username := '******@gmail.com'; Password := '*******'; Port := 995; IOHandler := IOHandlerTLS; UseTLS := utUseImplicitTLS; end; with IOHandlerTLS do begin Destination := 'pop.gmail.com:995'; Host := 'pop.gmail.com'; Port := 995; DefaultPort := 0; SSLOptions.Method:=sslvTLSv1_2; end; POP3.Connect; POP3.Login; try Messages.Clear; IDmessage := TIdMessage.Create(nil); try //for i := 1 to POP3.CheckMessages do for i := 1 to 10 do begin IDmessage.Clear; POP3.Retrieve(i, IDmessage); Messages.Items.Add; Messages.Items[i - 1].Caption:=DateToStr(IDmessage.Date); Messages.Items[i - 1].SubItems.Add(IDmessage.From.Address); Messages.Items[i - 1].SubItems.Add(IDmessage.Subject); Messages.Items[i - 1].SubItems.Add(IDMessage.Body.Text); end; finally FreeAndNil(IDmessage); end; finally POP3.Disconnect; end; except on e : Exception do ShowMessage('error=' + e.Message); end; end; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.