I know that the SMTP server requires TLS so I'm using OpenSSL (on Windows).
openssl s_client -connect smtp.gmail.com:465 -crlf
Now, I know that I have to encode a string (basically
\x00myemail\x00password) that has my account and password using base64. Things work pretty well:
AUTH PLAIN <encodedString> 235 2.7.0 Accepted
The problem is when I try to write my message:
MAIL FROM:<myemail> 250 2.1.0 OK qwertyzxcv.1 - gstmp RCPT TO:<myemail> RENEGOTIATING depth=1 C = US, O = Google Inc, CN = Google Internet Authority verify error:num=20:unable to get local issuer certificate verify return:0
The truth is that I don't understand that error message. Do I have to generate some certificate? If so, how do I do it (again, on Windows)?
EDIT: I finally solved the problem. You HAVE to write the command
rcpt in lowercase because
R makes OpenSSL to renegotiate. But now, I have a new problem. It seems that the SMTP server can't recognize de
DATA 502 5.5.1 Unrecognized command qwertyzxcv.1 -gsmtp