What is the algorithm for creating a login and password for AUTH on SMTP (port 587) or how can I create my login and password for AUTH from my own mail application, to connect to GMAIL for example?
CodePudding user response:
echo -ne '\0000username\0000password' | openssl base64
See this article of mine.
CodePudding user response:
You need to check what authentication mechanisms the server supports. The server will advertise them as part of the EHLO
reply; see Wikipedia or RFC 4954. From the authentication mechanisms offered, you pick one. For example, if you are already using an encrypted connection, you can use PLAIN AUTH, or if the connection is not encrypted, you may need to use CRAMMD5.
Normally any SMTP client library should handle this for you.
GMail has changed their settings to lock out insecure apps around May / June 2022. If your question is about that, see this question's answers as well.