Serge wrote:

Wow! that was fast answer from this mailing list! Thanks a lot!
it works for the connection, I can say EHLO, and it answer, now, what is the rest of sending an email using ssl/tls as gmail ask for STARTTLS command which I send (I learned that by using telnet). But it answer unrecongnized command? So, I look at the variable and the starttls option was not there?! instead I had AUTH LOGIN, so I use auth login instead and then received the correct md5 question to my username, then password, then it replied: 535 5.7.1 Credentials Rejected??? what's that? is starttls on another port? (995) and why the authentification is only plain?

I am not very deep in SSL/TLS-SMTP, but as I see it you do not need the STARTTLS-command if you connect to 465, since this is (obviously) a dedicated SSL-Port. And after you call SSL_connect the following SSL_writes are alredy using the encrypted channel.
If you connect to Port 25 you have to send the STARTTLS command (and most probably wait and react to its response) *before* you call SSL_connect.

anyway, I enter my valid username and password after receiving the right answers (334 return from smtp server) but I get that rejected message?
[...]

I'd just guess your password is incorrect, so you are rejected... ;)
I don't know the specifics of the SMTP AUTH command, maybe you did not convert/prepare/encrypt your password correctly. This would be a job of looking up the SMTP AUTH specification in the RFCs.

Anyway, this discusion is becoming off-topic, since the password problem is a problem of SMTP and not of SSL. If you want to continue the thread let's take it off-list.

Kind regards,
Ted
;)

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature



Reply via email to