Hello all, long time since I've been around.
Back in the day I made several enhancements to TSmtp class and others
chimed in to implement authentication.
Until now I've never had a need for authentication, but now I do and
it isn't working quite right with gmail.
Here's the info I was provided:
smtp.gmail.com
Use Authentication: Yes
Port for TLS/STARTTLS: 587
Port for SSL: 465
So I do
oMail := TSmtp():New( cHost, if( lAuth, 587, 25 ), lAuth, cUser, cPass ) // [jlalin], IBTC
that is I set the port to 587 I get as far as the log shows, but I don't know where
does the SSL port 465 come into play and where do you use it:
02/04/13 16:08:01: Connect Socket handle: 552 WSA Error: 0
02/04/13 16:08:01: Write Socket handle: 552 WSA Error: 0
02/04/13 16:08:01: Read Socket handle: 552 WSA Error: 0
02/04/13 16:08:01: 220 mx.google.com ESMTP bg10sm13836353igc.6 - gsmtp
02/04/13 16:08:01: HELO smtp-client
02/04/13 16:08:01: AUTH LOGIN
02/04/13 16:08:01: Read Socket handle: 552 WSA Error: 0
02/04/13 16:08:01: 250 mx.google.com at your service
02/04/13 16:08:01: Read Socket handle: 552 WSA Error: 0
02/04/13 16:08:01: 530 5.7.0 Must issue a STARTTLS command first. bg10sm13836353igc.6 - gsmtp
02/04/13 16:18:01: Read Socket handle: 552 WSA Error: 0
02/04/13 16:18:01: 451 4.4.2 Timeout - closing connection. bg10sm13836353igc.6 - gsmtp
02/04/13 16:18:01: Close Socket handle: 552 WSA Error: 0
It's clear that the gmail server is expecting some new call after
530 5.7.0 Must issue a STARTTLS command first. bg10sm13836353igc.6 - gsmtp
but I don't know where/how to make it work.
Any suggestions are appreciated.