THIS IS WHERE I AM STUCK
The next message back from the email client (outlook) is a 165 byte encrypted string that I do not know what to do with it. I have all the outlook email setting correct i think.
... TLS negotiation proceeds, further commands
protected by TLS layer ...
I have this coded, but it never get to this section
There is a method called
net.SwitchToSSL()
However I’ve only used it myself in a client context, not a server context, so I’m not sure it’ll work there.
That said, perhaps it’s easier to make your Simple Server TLS all the time.
What you’re seeing at the moment is that the Client program is set to use STARTTLS.
In this mode the client connects to the server on an insecure connection, then tells the server to switch to secure TLS mode.
Most servers (and all clients) also support an alternate approach - which is to use a Secure TLS connection from the start. This is typically done over Port 465. The client doesn’t do the STARTTLS dance - it just connects over TLS from the start. Doing it this way is a lot simpler for you because you just set net.SSL = true, and open the port.
I do use SwitchToSSL after the initial conversation between client/server and that works. it’s the “TLS security negotiation” I am having issue with that occurs after that.
Resolved: I decided to go with AUTH PLAIN and was able to get a full conversation w/ user/pswd credentials (I will use some other encryption later) authentication and email either rejected or sent based on values.