(Trying again because not making much progress)
Okay, I've got an older microsoft VC++ 6.0 program that works great, it's a home automation program that sends me an email at work at certain times.
However, I'd like to switch smtp servers to my gmail account, but smtp.gmail.com requires some sort of encryption (I think it's TLS, because when I telnet in to send an email I get a "must issue a STARTTLS command first z52ss97610"). I am sending my email using sockets with this server, so I have to figure out what commands to send the server (I think I'm supposed to process that z52ss976 into a hashed value, with my password probably, and send it back?). Does anyone have a specific blow-by-blow about how to negotiate with these email servers? Or some sample code that handles this?
Previously I was using the popular FastSMTP class, which works great but isn't built to handle this type of authentication.
(By the way this works perfectly and transparently with my .NET programs, I can send an email programmatically using my gmail account, so I know it's possible, it's just that the encoding -- MD5? -- is performed automatically by the .NET objects. In MFC I have to do this manually by sending the right data using sockets, and I just don't know how to calculate the right responses and what to send. I do NOT want to convert this program to .NET, this should be very do-able in MFC)
I've been working three angles, none easy:
gives a lot of detail on the data and sequence. This would be writing it from scratch, and assuming that this really tells you everything. A lot of work.
which is a project that extends an async socket with SSL. My first problem is that I don;t how to apply this yet, gmail requires a connection, and then a STARTTLS command, then TLS handshaking. Not sure this gives you that much control (although I try to figure it out by inspection and it seems to call all of that stuff out of the openssl library, thus...)
which is an open source ssl/tls library, which could fit my bill but haven't even scratched the surface yet.
Any is a pain in the butt, anybody have anything to move me along in any direction? Thanks!.