david_navigator 12 Posted November 13, 2020 I have an old app that we use frequently that only support sending SMTP emails via an unauthenticated connection on port 25. Of course these days no ISP allows this kind of connection. Is my simplest solution to write an app that it can connect to to send any emails, (acting as an SMTP server) and then send the email on (acting as an SMTP client) using modern connection techniques ? I was thinking of Indy (SMTP Server -> SMTP Client), but maybe there's some components that already do this or even better an off the shelf (cheap) solution ? Cheers David Share this post Link to post
FPiette 385 Posted November 13, 2020 Why don't you simply update your application to use the SMTP component with SSL enabled (SMTPS)? If you don't want to update your application, then you can do as you said, but of course using ICS components. You have everything you need. This application would altough be more complex that a simple update of the existing application to use SMTPS. Share this post Link to post
david_navigator 12 Posted November 13, 2020 The app is an old D5 one with loads of components that are no longer available. I no longer have a D5 development environment, so I think that creating a new Vmware machine, finding a D5 install, setting it up with all the original components and then updating it to use SMTPS (if there is a D5 version) would take longer than writing an intermediate app ? Share this post Link to post
FPiette 385 Posted November 13, 2020 There is no ICS with SSL for Delphi 5. If you have a lot of component it is feasible to port it to latest Delphi version provided you have full source code for every components. Share this post Link to post
david_navigator 12 Posted November 13, 2020 25 minutes ago, FPiette said: There is no ICS with SSL for Delphi 5. If you have a lot of component it is feasible to port it to latest Delphi version provided you have full source code for every components. I am rewriting it slowly with current components (there's just too much work getting the old ones to work - one suite was such spaghetti code, it was impossible), but I need a "quick fix" solution to the email. I'll have a look at your samples. I'm guessing you have a sample SMTP server and sample SMTP client demo to get me started ? Share this post Link to post
Angus Robertson 577 Posted November 13, 2020 You can use a stand-alone proxy server such as STunnel running on the same network to accept connections on port 25 and send SSL to port 465, you don;t need a full SMTP server. ICS has a proxy sever component that does exactly that (I use it for an old email client) but we only support Delphi 7 and later. And using ICS, you'd now use TMailQueue instead of an SMTP client since it queues mail to multiple SMTP servers. Angus Share this post Link to post
david_navigator 12 Posted November 13, 2020 4 minutes ago, Angus Robertson said: You can use a stand-alone proxy server such as STunnel running on the same network to accept connections on port 25 and send SSL to port 465, you don;t need a full SMTP server. Brilliant. That sounds idea. WIll check it out. 5 minutes ago, Angus Robertson said: ICS has a proxy sever component that does exactly that (I use it for an old email client) but we only support Delphi 7 and later. No problem, my current development environment is Sydney. Share this post Link to post
Angus Robertson 577 Posted November 13, 2020 Just build the OverbyteIcsProxySslServer sample, and edit the INI file to point to the correct SMTP server. Angus Share this post Link to post
Remy Lebeau 1436 Posted November 13, 2020 7 hours ago, david_navigator said: Is my simplest solution to write an app that it can connect to to send any emails, (acting as an SMTP server) and then send the email on (acting as an SMTP client) using modern connection techniques ? If you can't update the app to use SSL/TLS, then yes. 7 hours ago, david_navigator said: I was thinking of Indy (SMTP Server -> SMTP Client) That is an option, yes. Though, using a full SMTP server (ie TIdSMTPServer) might be a bit excessive, a simpler connection proxy (such as TIdMappedPortTCP) might suffice, since you just need to activate SSL/TLS on the outgoing connection. It really depends on whether you intend to utilize the SMTP STARTTLS command or not, since that will dictate WHEN the SSL/TLS handshake needs to be performed. Share this post Link to post
Ian Branch 128 Posted November 13, 2020 (edited) So here's a thought. I use Eurekalog for exception tracking/logging/reporting. Eurekalog has various 'mail' capabilities built in as it needs to be able to send error reports to a multitude of different types of destinations. A by product of this is its ability to be used as an email sender in general. Rather than use an additional email suite to send reports from my Apps I use the built in Eurekalog email functions to send them. It doesn't need any external SSL module/DLL. I primarily use smtp client functionality but it can do smtp server as well as many other protocols. Caveat - Eurekalog does not officially promote this capability in Eurekalog and therefore it could change, but is unlikely to. Worth a look. P.S. Works with D5. Edited November 13, 2020 by Ian Branch Addition of P.S. Share this post Link to post