SmtpClient() now supports SSL

Xbase++ 2.0 Build 554 or later
Post Reply
Message
Author
User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

SmtpClient() now supports SSL

#1 Post by rdonnay »

I keep finding new stuff in Xbase++ 2.0 that simplies my life, especially when working with the Internet.

This is part of the code from my order processing web page:

Code: Select all

// Version 1.9 (was)

oSmtp := SMTPClient():new( Alltrim(cSMTPServer), 2525, 'donnay-software.com' )

// This required running STUNNEL.EXE which listened on port 2525 of LocalHost and rerouted to port 465 of smtp.gmail.com
// If STUNNEL.EXE was not running the mail would not be sent.  This happened several times.

// Version 2.0 (is)

oSmtp := SMTPClient():new( Alltrim(cSMTPServer), 465, 'donnay-software.com' )
The other cool thing about this was that I never had to down the web server to do this because the code is all in a file named OrderProcess.Cxp.
I simply changed the CXP code and that was all.
The next time the OrderProcess.Cxp page was called, it was automatically compiled into a DLL and ran the new code.
The eXpress train is coming - and it has more cars.

Post Reply