Frederick Posted July 14, 2021 Share Posted July 14, 2021 I created a test project that uses Overbyte's ICS to connect to a mail server. After entering the parameters and clicking the Connect button, nothing happens. The event that is attached to the SMTP component is never called. However, when I create the exact same project in a VCL application, everything works as expected. What am I missing here? P.S. I have attached the testcase. -- Frederick (UniGUI Complete - Professional Edition 1.90.0.1551) icsconnect.zip Quote Link to comment Share on other sites More sharing options...
Harry Rogers Posted July 15, 2021 Share Posted July 15, 2021 Hi We have used ICS components a lot over the years - and have been very pleased with them. However we have found their architecture not well suited to Unigui. In our implementations we tend to use a VCL program to send emails which we call from the Unigui sessions as needed, with parameters supplied either via the command line or database tables - there are other discussions and demos on the forum regarding email solutions. There is a thread from 2010 relating to ICS - Farshad's reply summed it up. Best of luck It seems that Overbyte components use Async TCP/IP communication which relies on Windows message events. This requires component to reside inside a thread which can receive Windows events. In unigui there are no such dedicated threads to sessions. Threads are created and controlled by the Web server and for sessions threads are only available during event execution. Moreover, it is not guaranteed that a session will be always served by same thread. It can thread A in first event and thread B in next event. Quote Link to comment Share on other sites More sharing options...
Roberto Nicchi Posted July 15, 2021 Share Posted July 15, 2021 I have used Indy compnents in unigui app with no problems. Maybe you miss some dll ? In indy i have to include the openssl dll if ssl is used. Quote Link to comment Share on other sites More sharing options...
Frederick Posted July 15, 2021 Author Share Posted July 15, 2021 6 hours ago, Harry Rogers said: There is a thread from 2010 relating to ICS - Farshad's reply summed it up. Best of luck It seems that Overbyte components use Async TCP/IP communication which relies on Windows message events. This requires component to reside inside a thread which can receive Windows events. In unigui there are no such dedicated threads to sessions. Threads are created and controlled by the Web server and for sessions threads are only available during event execution. Moreover, it is not guaranteed that a session will be always served by same thread. It can thread A in first event and thread B in next event. This statement confirms that ICS was incompatible with UniGUI 11 years ago but it would have been reassuring for technical support to confirm that ICS does not work with UniGUI today. Quote Link to comment Share on other sites More sharing options...
Frederick Posted July 15, 2021 Author Share Posted July 15, 2021 5 hours ago, Roberto Nicchi said: I have used Indy compnents in unigui app with no problems. Maybe you miss some dll ? In indy i have to include the openssl dll if ssl is used. I did use Indy components initially for test connecting to my mail server but it failed at the SSL handshaking stage. For some weird reason, connecting to a Google mail server did not pose a problem. After revisiting Indy (because ICS does not work) in a new test project, connecting to my mail server and Google's mail server in 32 bit mode resulted in no errors. However, recompiling in 64 bit resulted in the same problems in my full project. I suspected that there were some issues with the SSL libraries and I read from a Google search that the SSL DLL files as installed by UniGUI should be copied to the app's output directory. I did so and now, both mail servers can be connected to in 64 bit mode without errors. Note: I am curious as to why the SSL DLL files in the Window's System32 directory are not referred to by the UniGUI app. Quote Link to comment Share on other sites More sharing options...
Roberto Nicchi Posted July 15, 2021 Share Posted July 15, 2021 1 minute ago, Frederick said: I did use Indy components initially for test connecting to my mail server but it failed at the SSL handshaking stage. For some weird reason, connecting to a Google mail server did not pose a problem. After revisiting Indy (because ICS does not work) in a new test project, connecting to my mail server and Google's mail server in 32 bit mode resulted in no errors. However, recompiling in 64 bit resulted in the same problems in my full project. I suspected that there were some issues with the SSL libraries and I read from a Google search that the SSL DLL files as installed by UniGUI should be copied to the app's output directory. I did so and now, both mail servers can be connected to in 64 bit mode without errors. Note: I am curious as to why the SSL DLL files in the Window's System32 directory are not referred to by the UniGUI app. Don't know. I always copy the dll in the application directory. Quote Link to comment Share on other sites More sharing options...
irigsoft Posted July 15, 2021 Share Posted July 15, 2021 21 minutes ago, Frederick said: I suspected that there were some issues with the SSL libraries Yes, I think this is the real problem. Check in openssl documentations . Quote Link to comment Share on other sites More sharing options...
Frederick Posted July 16, 2021 Author Share Posted July 16, 2021 13 hours ago, irigsoft said: Check in openssl documentations . I'll leave the reading of the OpenSSL documentation to security enthusiasts 🙂. Us mere mortals need only know that we can use the Indy components in a secure environment as long as the two SSL DLL files are copied to the same directory as the application. Quote Link to comment Share on other sites More sharing options...
irigsoft Posted July 16, 2021 Share Posted July 16, 2021 3 hours ago, Frederick said: I'll leave the reading of the OpenSSL documentation to security enthusiasts 🙂. Us mere mortals need only know that we can use the Indy components in a secure environment as long as the two SSL DLL files are copied to the same directory as the application. Quote Link to comment Share on other sites More sharing options...
Fred Montier Posted July 16, 2021 Share Posted July 16, 2021 After all option excluded, set your account to work with less secure app. At GMail (smtp.gmail.com), that is really a issue. Not sure about smtp.googlemail.com. Using Indy works just fine. Quote Link to comment Share on other sites More sharing options...
Frederick Posted July 16, 2021 Author Share Posted July 16, 2021 3 hours ago, Fred Montier said: After all option excluded, set your account to work with less secure app. At GMail (smtp.gmail.com), that is really a issue. Not sure about smtp.googlemail.com. Using Indy works just fine. Thank you for the confirmation. Quote Link to comment Share on other sites More sharing options...
Phxtecno Posted July 20, 2021 Share Posted July 20, 2021 Have the same problem with IPworks SMTP component... I have copied the SSL dlls in the same folder of the exe but nothing change... Any other advice ? Regards 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.