Version history
This library adheres to Semantic Versioning 2.0.
2.0.0
BACKWARDS INCOMPATIBLE The concrete client implementations were refactored:
AsyncSMTPClientandSyncSMTPClientwere refactored into “session factories”, and thus are no longer used as context managersThe
send_message()method is now reentrant, as it now creates (and closes) an ad-hoc session with the SMTP serverThe
connect()method now returns a context manager that yields an SMTP session
BACKWARDS INCOMPATIBLE The
OAuth2Authenticatorclass was refactored:The return type of
get_token()was changed to a (decoded) JSON web token – a dict containing theaccess_tokenandexpires_infieldsThe result of
get_token()method is now automatically cached until the token’s expiration time nears (configurable via thegrace_periodparameter inOAuth2Authenticator)Added the
clear_cached_token()method
Dropped support for Python 3.7
Upgraded minimum AnyIO version to 4.2+
The
BccandResent-Bccare now properly added to the recipients list by the concrete client implementationThe
BccandResent-Bccheaders are now automatically left out of the data inSMTPClientProtocol.data()to simplify client implementations
1.2.1
Fixed
LoginAuthenticatorexpecting the wrong questions (there should be a:at the end)Fixed compatibility with AnyIO 4
1.2.0
Dropped support for Python 3.6
Added support for Python 3.10
Upgraded minimum AnyIO version to 3.0+
Changed
SMTPClientProtocolto only useSMTPUTF8if necessary (PR by Cole Maclean)
1.1.0
Added missing
authorization_idparameter toPlainAuthenticator(also fixesPLAINauthentication not working since this field was missing from the encoded output)Fixed sender/recipient addresses (in
MAIL/RCPTcommands) not being UTF-8 encoded in the presence of theSMTPUTF8extension
1.0.0
Initial release