in reply to Secure SMTP/POP for gmail
Simplest thing to do would be to use stunnel to setup a tunnel to the secure gmail servers and make your stuff connect to the local end of that.
-- We're looking for people in ATL