# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [4.0.54] - 2026-12-03
### Changed
- Packaging moved from setup.py to pyproject.toml (hatchling) and uv.lock;
  releases are published from GitHub Actions through PyPI trusted
  publishing (RELEASING.md). The wheel ships exactly the tracked files of
  codenerix_email: the __pycache__ and .mypy_cache entries the old builds
  picked up are gone (1704 entries, 3.7 MB in 4.0.53; 44 entries, 54 KB
  now), and so is the py2 tag. Metadata: SPDX license Apache-2.0,
  Requires-Python >=3.10, current classifiers. Requirements unchanged.
- models.py formatting and import order cleanup, no behaviour change.
- Catalogs: source references refreshed, no translation change.
- README: SonarCloud quality gate badge.

### Added
- CI: ruff and mypy once, the smoke test suite on Python 3.11 to 3.14.
- SECURITY.md and RELEASING.md.

## [4.0.53] - 2026-08-14
- Bounce DSN parser reads per-recipient fields (RFC 3464), not only the
  per-message block, so Action/Status were never found
- Bounce reason now includes the SMTP Diagnostic-Code
- Heuristic bounce detection no longer assumes hard bounce when no SMTP
  code is available, it reports soft instead
- Tracking ID lookup in body text accepts the 32 char hex form written by
  get_headers(), it only matched the dashed form before
- Message-ID domain extracted with parseaddr(), a display name in
  EMAIL_FROM produced a malformed Message-ID
- EMAIL_FROM falls back to DEFAULT_FROM_EMAIL when undefined
- EmailMessage.save() fills in efrom when empty and warns about it

## [4.0.52] - 2026-05-10
- Emails Send command improved
- Legacy commands rewrotten in a more idiomatic way

## [4.0.51] - 2026-03-13
- Retry system repaired

## [4.0.50] - 2026-03-13
- Guards added to send
- EmailFollow hidden pixel repaired

## [4.0.49] - 2026-03-27
- Missing migration added

## [4.0.48] - 2026-02-06
- Example corrected in management command

## [4.0.47] - 2026-02-06
- Max retries is not considered in emails_send management command

## [4.0.46] - 2026-02-03
- EmailMessage form reordered

## [4.0.45] - 2026-02-03
- Corrected message when using emails_send --all

## [4.0.44] - 2026-02-02
- Improved emails_recv to support --file argument to read an email from a file

## [4.0.43] - 2026-02-02
- Correction to BOUNCE TYPE string detection

## [4.0.42] - 2025-10-20
- Sometimes encoded headers are smart strings that need str() to avoid the complexity
  of the object.

## [4.0.42] - 2025-10-20
- Added ignore to prevent decoding errors while processing messages for mixed encodes

## [4.0.41] - 2025-10-20
- Prevent crashes from invalid charsets in received messages

## [4.0.40] - 2025-10-08
- Corrected the way EmailMessage show bounces to improve performance

## [4.0.39] - 2025-10-08
- Added options to chosse the IMAP selector and to DELETE emails or set them as SEEN for a more granular control

## [4.0.38] - 2025-10-08
- Added filtering support for IMAP receiving emails

## [4.0.37] - 2025-09-30
- Content Subtype removed from send()

## [4.0.36] - 2025-09-30
- Deprecation warning repaired

## [4.0.35] - 2025-09-30
- Email commands deprecated to a new more standard name

## [4.0.34] - 2025-09-30
- Removed forgotten print in the code

## [4.0.33] - 2025-09-30
- Command recv_emails wont't fail if silent is enabled

## [4.0.32] - 2025-09-29
- Added details modal window for sent and received emails

## [4.0.31] - 2025-09-29
- Several improvements on type checking

## [4.0.30] - 2025-09-26
- Added support to receive emails throught IMAP, analize bounces and relate with sent emails

## [4.0.29] - 2025-08-04
- Added subject to the template listing

## [4.0.28] - 2025-07-28
- Support self Message-ID when no other is indicated

## [4.0.27] - 2025-05-12
- Support for manage.py command "test_email" which now support extra arguments to improve testing

## [4.0.26] - 2025-01-31
- Reversed the list of Email Templates

## [4.0.25] - 2024-12-30
- Test email script corrected

## [4.0.24] - 2024-12-23
- Updated package naming to compliant with PEP625

## [4.0.23] - 2024-10-21
- Translations

## [4.0.22] - 2024-10-15
- Not to confuse the user, the default ordering for EmailMessages is now "-created"

## [4.0.21] - 2024-10-15
- Added support for custom headers for EmailMessages

## [4.0.20] - 2024-10-11
- Repaired headers for EmailMessages

## [4.0.19] - 2024-10-11
- Improved listing of messages

## [4.0.18] - 2024-10-10
- Newer version of CODENERIX is required for this one to work

## [4.0.17] - 2024-10-10
- Support for unsubscribe headers

## [4.0.16] - 2024-06-17
- Improved listing for sent emails

## [4.0.15] - 2024-06-10
- Translations to Spanish

## [4.0.14] - 2024-06-05
- Added new datetime_filter in EmailMessage list

## [4.0.13] - 2024-06-04
- Removed warnings on silent mode

## [4.0.12] - 2024-06-04
- Don't say about reconnections if everything goes fine

## [4.0.11] - 2024-06-04
- Improved mailing system

## [4.0.10] - 2024-06-02
- Improved the way the list of EmailMessages is shown

## [4.0.9] - 2024-06-02
- Breadcrumb ford emails
- Template variable context renamed from '__emsg__uuid__' to 'CDNX_EMAIL_emsg_uuid'

## [4.0.8] - 2024-05-29
- Breadcrumb ford emails

## [4.0.7] - 2024-05-23
- Follow opened emails: register opened only the first time

## [4.0.6] - 2024-05-22
- Follow opened emails: added tag __emsg__uuid__ for body context

## [4.0.5] - 2024-05-22
- Follow opened emails

## [4.0.4] - 2024-04-08
- Debugger now uses codenerix-lib

## [4.0.3] - 2024-02-07
- Changes default ordering for Email Messages Queue List

## [4.0.2] - 2023-12-18
- Silent parameter in sent will not warn about connection status

## [4.0.1] - 2023-05-17
- Django 4.x support
