PlanetSquires Forums

Support Forums => General Board => Topic started by: Richard Kelly on April 07, 2015, 06:58:48 AM

Title: SMTPS
Post by: Richard Kelly on April 07, 2015, 06:58:48 AM
I dabbled a bit with SChannel for encrypted sessions with SMTP mail servers. Not sure when I'll get 'er finished up. Attached is a PBWin source file with the EXE. Since I hadn't run the code for a bit, I ran it against:

smtp.gmail.com
smtp.mail.yahoo.com
smtp.ntlworld.com
outgoing.verizon.net
smtp.mail.com

with port 465 and didn't see any obvious errors. All the code is doing, is the SSL handshake, then retrieve the server greeting and sending an EHLO before disconnecting. There is a trace file created during the run that you can open after getting the trace complete message and see what went on.

I know the code is quite rough with only basic error detection. Additionally, I still have to figure out when MSDN is referring to as "extra" buffers and the %SEC_E_INCOMPLETE_MESSAGE (and session renegotiations) and at least it is a basic working model if anybody wants to play around. The function calls are sequenced for port 465/SSL and not 587/TLS.

Jump in and see what you can do! It would be nice to have a complete SMTP class with SSL support which I'll create when all this SSL stuff gets figured out.

Rick Kelly

p.s. Vista+ and Jose's includes
Title: Re: SMTPS
Post by: Richard Kelly on April 15, 2015, 09:23:14 AM
I have the beginnings of a SMTP class going on and started a thread on the PB forums at:

http://www.powerbasic.com/support/pbforums/showthread.php?t=59221 (http://www.powerbasic.com/support/pbforums/showthread.php?t=59221)

Of course, the class will require Jose's includes and Vista+.

Rick Kelly
Title: Re: SMTPS
Post by: Richard Kelly on April 22, 2015, 06:09:21 AM
I'm in the final stages of testing. If you want to help out, see:

http://www.powerbasic.com/support/pbforums/showthread.php?t=59221

Rick Kelly
Title: Re: SMTPS
Post by: Richard Kelly on April 25, 2015, 09:15:35 AM
Source now at:

http://www.powerbasic.com/support/pbforums/showthread.php?p=476779#post476779