Skip to content

Upgrading aiosmtplib 2 to 3

Breaking2.0.2 → 3.0.2Breaking3Changed3Fixed3Other2

BreakingUpgrade verdict

3 breaking changes.

  • This version no longer works on Python 3.7; you need a newer Python.
  • You can no longer mix up positional and keyword arguments; calls must use the correct form.
  • The source_address option now expects an address and port pair for binding to a specific IP, and local_hostname is what gets sent to the server in EHLO/HELO.
3 items need code or config changes

Python requirement changed in 3.0.2: >=3.7,<4.0 → >=3.8.

Breaking3
Drops Python 3.7 support.
Makes positional arguments positional only and keyword arguments keyword only.
Passing source_address as a string is now an error; it takes an (addr, port) tuple, and local_hostname sets the EHLO/HELO value.
source_addresslocal_hostnameasyncio.create_connection