PyDocs

Nav

Internet Protocols and Support

SMTP.auth

smtplib

method of SMTP · Added in 3.5 (source) not WASI
  • SMTP.auth(mechanism, authobject, *, initial_response_ok=True)
Authentication command - requires response processing.

'mechanism' specifies which authentication mechanism is to
be used - the valid values are those listed in the 'auth'
element of 'esmtp_features'.

'authobject' must be a callable object taking a single argument:

        data = authobject(challenge)

It will be called to process the server's challenge response; the
challenge argument it is passed will be a bytes.  It should return
an ASCII string that will be base64 encoded and sent to the server.

Keyword arguments:
    - initial_response_ok: Allow sending the RFC 4954 initial-response
      to the AUTH command, if the authentication methods supports it.
0 Examples
No examples for smtplib/SMTP.auth.
See Also
No see-alsos for smtplib/SMTP.auth
0 Notes
No notes for SMTP.auth