Skip to content

Commit

Permalink
Merge pull request #1396 from appsembler/feat/add-mandrill-subaccount…
Browse files Browse the repository at this point in the history
…-support

feat: Add Mandrill Subaccount support
  • Loading branch information
amirtds committed Jan 29, 2024
2 parents 8ee7fb4 + 3022eb7 commit 2de42bd
Showing 1 changed file with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,22 @@ def plugin_settings(settings):
"MANDRILL_API_KEY": settings.MANDRILL_API_KEY,
}
settings.INSTALLED_APPS += ['anymail']

# Mandrill Subaccount Support
settings.MANDRILL_SUBACCOUNT = settings.ENV_TOKENS.get("MANDRILL_SUBACCOUNT")
if settings.MANDRILL_SUBACCOUNT:
subaccount_settings = {
"MANDRILL_SEND_DEFAULTS": {
"esp_extra": {
"message": {
"subaccount": settings.MANDRILL_SUBACCOUNT
}
}
}
}
if settings.ANYMAIL:
settings.ANYMAIL.update(subaccount_settings)
else:
settings.ANYMAIL = subaccount_settings
# Sentry
settings.SENTRY_DSN = settings.AUTH_TOKENS.get('SENTRY_DSN', False)
if settings.SENTRY_DSN:
Expand Down

0 comments on commit 2de42bd

Please sign in to comment.