Closed mounirmesselmeni closed 10 months ago
@mounirmesselmeni thanks for the bug report. We should use a deep merge for esp_extra. (This will only affect ESPs that use nested data structures in their payloads: Sparkpost, Mandrill, maybe a few others I'm forgetting.)
Fix released in Anymail 10.2
Reporting an error? It's helpful to know:
The documentation says that when using ESP extra those options will be merged if defined in message.esp_extra, but in reality those options get overriden, if I pass in message.esp_extra for example the pool_name, the default transactional will be missing.
This is because inside anymail's combine function, the python dict.update check only for first level.
In other words:
this is what is done in the combine function https://github.com/anymail/django-anymail/blob/main/anymail/utils.py#L50