Jump to content
david_navigator

SMTP Server -> Client

Recommended Posts

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

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

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

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
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

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
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
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

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 by Ian Branch
Addition of P.S.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×