Ian Branch 127 Posted February 18, 2021 Hi Team, D10.4.1, Indy as supplied with Delphi. I have the following code.. begin // IdSSLIOHandlerSocketOpenSSL1 := TIdSSLIOHandlerSocketOpenSSL.Create(self); // IO HANDLER SETTINGS // with IdSSLIOHandlerSocketOpenSSL1 do begin Destination := 'smtp-mail.outlook.com:587'; Host := 'smtp-mail.outlook.com'; MaxLineAction := maException; <<<<< Error here. Port := 587; SSLOptions.Method := sslvTLSv1; SSLOptions.Mode := sslmUnassigned; SSLOptions.VerifyMode := []; SSLOptions.VerifyDepth := 0; end; I am getting an Undeclared identifier error for maException. Is this a known issue? If so, is there a work around? Will it matter if I comment out the line?? Regards & TIA, Ian Share this post Link to post
Remy Lebeau 1398 Posted February 18, 2021 (edited) First off, you DO NOT need to set the IOHandler's Destination, Host, and Port properties. Those are handled internally by Indy for you. As for the error, check if Scoped Enums is enabled. If so, you will have to fully-qualify the value by the enum's type name, eg: MaxLineAction := TIdMaxLineAction.maException; That being said, the MaxLineAction property defaults to maException anyway, so there is no need to set that value explicitly in this case. Edited February 18, 2021 by Remy Lebeau 1 Share this post Link to post
Ian Branch 127 Posted February 18, 2021 Hi Remy, First foray into Indy. I just copied code from another source. Quote First off, you DO NOT need to set the IOHandler's Destination, Host, and Port properties. Those are handled internally by Indy for you. Oh! OK. I take it I still need to create the IOHandler and set the other parameters? 'Scoped Enums' - Haven't touched as far as I am aware. I had a look in Building|Delphi Compiler|Compiling and can't see anything that suggests 'Scoped Enums' to me. 😞 I'm guessing if Scoped Enums is On or OFF by declaring MaxLineAction := TIdMaxLineAction.maException; Should resolve it, shouldn't it? Where does TIdMaxLineAction come from? Regards & Tks, Ian Share this post Link to post
Lajos Juhász 293 Posted February 18, 2021 8 hours ago, Ian Branch said: Where does TIdMaxLineAction come from? The source of Indy is delivered with Delphi so you can find it easily. It's in IdGlobal.pas. Share this post Link to post
Remy Lebeau 1398 Posted February 18, 2021 15 hours ago, Ian Branch said: I take it I still need to create the IOHandler and set the other parameters? Yes. 15 hours ago, Ian Branch said: 'Scoped Enums' - Haven't touched as far as I am aware. Is your project using VCL or FMX? VCL is compiled with OFF by default. FMX is compiled with ON by default. 15 hours ago, Ian Branch said: I had a look in Building|Delphi Compiler|Compiling and can't see anything that suggests 'Scoped Enums' to me. 😞 AFAIK, there is no IDE setting for Scoped Enums, they are controlled only via the {$SCOPEDENUMS} compiler directive. 15 hours ago, Ian Branch said: I'm guessing if Scoped Enums is On or OFF by declaring MaxLineAction := TIdMaxLineAction.maException; Should resolve it, shouldn't it? Should, yes. 15 hours ago, Ian Branch said: Where does TIdMaxLineAction come from? Indy's IdGlobal unit. Share this post Link to post
Ian Branch 127 Posted February 18, 2021 Hi Remy & Lajos, Thank you for your support. I am up and running. The sample code I started with had assumed the components were on the form, this was part of my problem, once I 'created' the components in the code all dropped into place and the addition of IdGlobal solved the last issue. Regards & Tks again. Ian Share this post Link to post
Ian Branch 127 Posted February 18, 2021 Thinking further down the line when I have this all stable.. What is the easiest/best method to replace the Indy supplied with D10.4, with the latest from GitHub? I have the svn for the latest Indy10 on my D:\Indy10 att. I keep it updated/current. I did try replacing the supplied version with the GitHub version back with D10.3 but screwed the whole thing up. :-( Share this post Link to post
Remy Lebeau 1398 Posted February 18, 2021 55 minutes ago, Ian Branch said: What is the easiest/best method to replace the Indy supplied with D10.4, with the latest from GitHub? Instructions can be found here: https://web.archive.org/web/20200925081341/http://ww2.indyproject.org/Sockets/Docs/Indy10Installation.EN.aspx (the live page on Indy's main website is offline right now). 55 minutes ago, Ian Branch said: I have the svn for the latest Indy10 on my D:\Indy10 att. I keep it updated/current. Indy doesn't use SVN anymore. Share this post Link to post
Ian Branch 127 Posted February 18, 2021 33 minutes ago, Remy Lebeau said: Indy doesn't use SVN anymore. Hi Remy... OK on the Instructions. "svn co https://github.com/IndySockets/Indy/trunk Indy10" using TortiseSVN seems to keep updating.. Currently it is at rev 3791. Am I getting the wrong one?? Ian Share this post Link to post
Remy Lebeau 1398 Posted February 19, 2021 19 hours ago, Ian Branch said: "svn co https://github.com/IndySockets/Indy/trunk Indy10" using TortiseSVN seems to keep updating.. Currently it is at rev 3791. Am I getting the wrong one?? No. GitHub provides an SVN interface. I was referring more to the fact that Indy doesn't use its own SVN server anymore now that it has migrated to GitHub: https://www.indyproject.org/2019/11/28/indy-svn-retiring-long-live-github/ Share this post Link to post