diff --git a/dbmail/backends/mail.py b/dbmail/backends/mail.py index 3d8d56e..8f9ed82 100644 --- a/dbmail/backends/mail.py +++ b/dbmail/backends/mail.py @@ -112,6 +112,8 @@ def _get_message(self): def _get_msg_with_track(self): message = self._message + if defaults.TRACK_ENABLE is False: + return message if ENABLE_LOGGING and self._template.enable_log: try: domain = Site.objects.get_current().domain diff --git a/dbmail/defaults.py b/dbmail/defaults.py index d1ce577..cd5a497 100644 --- a/dbmail/defaults.py +++ b/dbmail/defaults.py @@ -58,7 +58,7 @@ def get_settings(key, default): SIGNAL_DB_DEFERRED_PURGE = get_settings( 'DB_MAILER_SIGNAL_DB_DEFERRED_PURGE', True) -TRACK_ENABLE = get_settings('DB_MAILER_TRACK_ENABLE', False) +TRACK_ENABLE = get_settings('DB_MAILER_TRACK_ENABLE', True) TRACK_PIXEL = get_settings( 'DB_MAILER_TRACK_PIXEL', [ diff --git a/docs/conf.rst b/docs/conf.rst index 14a47bf..f91c33e 100644 --- a/docs/conf.rst +++ b/docs/conf.rst @@ -118,7 +118,7 @@ App settings # If tracking is enabled, Logging must be enabled to. # DbMail urls must be configured. # Site framework must configured and installed. - DB_MAILER_TRACK_ENABLE = False + DB_MAILER_TRACK_ENABLE = True # Tracking image content and mime type DB_MAILER_TRACK_PIXEL = [