I am at the very beginning of a new project, in an area which is new to me.
I want to code an application which which will act as a middle-man Windows based email clients, such as Thunderbird, etc, and a remote SMTP server. The reason being that my application will perform some slight manipulation of emails as they pass through.
So, I figured that I will want a TIdSMTPServer
. I decided to use port 6789, in case of any possible conflict (which I doubt, but ... j.i.c).
I set the SMTP server's DefaultPort
to 6789, and I also bound the SMTP server to 127.0.0.1:6789
in the Bindings
property (and, as @SirRufo pointed out, I set the server.active to true)..
Now, I added a button with some test code, based on this SO question. The only change I made was to change the port from SMTP.Port := 465;
to SMTP.Port := IdSMTPServer.DefaultPort
(host is left as 127.0.0.1
).
However, when I attempt to connect my IdSMTPServer
's IdSMTPServerConnect()
method is never called and I get an exception, "EIdSocketError # 10061 Connection refused".
Any idea what I am doing wrong?
(and is there any guide or tutorial describing the use of IdSMTPServer?)