Skip to content

Commit

Permalink
Inbound email log is HTML
Browse files Browse the repository at this point in the history
  • Loading branch information
vadimkerr committed Dec 6, 2024
1 parent cc0674e commit ed45274
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions engine/apps/email/inbound.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,9 @@ def message(self) -> AnymailInboundMessage | None:

messages = [event.message for event in events if isinstance(event, AnymailInboundEvent)]
if messages:
logger.info(f"Received inbound email message from ESP: {esp}")
return messages[0]
message: AnymailInboundMessage = messages[0]
logger.info(f"Received inbound email message from ESP: {esp}, is HTML: {message.html is not None}")
return message

logger.error("Failed to parse inbound email message")
return None
Expand Down
1 change: 1 addition & 0 deletions engine/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ banned-modules =
# --allow-hosts = allow connections to the given hostnames/IPs.
# - localhost = our tests on CI use localhost as the host to connect to databases running locally in docker container
# - oncall-dev-mariadb = if you're running things locally, with a MariaDB instance running, there's a good chance the hostname will be this
# pytest-socket is disabled for now as it's making tests hang on CI
addopts = --dist no --no-migrations --color=yes --showlocals
# https://pytest-django.readthedocs.io/en/latest/faq.html#my-tests-are-not-being-found-why
python_files = tests.py test_*.py *_tests.py
Expand Down

0 comments on commit ed45274

Please sign in to comment.