a guest Sep 21st, 2016 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- EMAIL_USE_TLS = True
- EMAIL_HOST = 'smtp.gmail.com'
- EMAIL_HOST_USER = 'email@example.com'
- EMAIL_HOST_PASSWORD = 'password'
- EMAIL_PORT = 587
- def send_email(subject, body, recipients, agent_email, bcc=, attachments=):
- recipient_list = 
- if isinstance(recipients, (str, unicode,)):
- recipient_list = recipients
- recipient_list = recipient_list + bcc
- send_mail(subject, body, settings.EMAIL_FROM, recipient_list)
RAW Paste Data