mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +00:00
ScheduledJobs with type Email displace the usual mandrill codepaths in the Zulip Enterprise deploys * Email-specific helper functions will appear in deliver_email.py * 0058_auto__add_scheduledjob.py (imported from commit 8db08d8a279600322acfdbed792dc1a676f7a0ab)
16 lines
345 B
Python
16 lines
345 B
Python
import mandrill
|
|
from django.conf import settings
|
|
|
|
MAIL_CLIENT = None
|
|
|
|
def get_mandrill_client():
|
|
if settings.MANDRILL_API_KEY == '' or not settings.DEPLOYED or settings.ENTERPRISE:
|
|
return None
|
|
|
|
global MAIL_CLIENT
|
|
if not MAIL_CLIENT:
|
|
MAIL_CLIENT = mandrill.Mandrill(settings.MANDRILL_API_KEY)
|
|
|
|
return MAIL_CLIENT
|
|
|