daily pastebin goal
44%
SHARE
TWEET

Untitled

a guest Sep 21st, 2016 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. EMAIL_USE_TLS = True
  2. EMAIL_HOST = 'smtp.gmail.com'
  3. EMAIL_HOST_USER = 'email@myemail.com'
  4. EMAIL_HOST_PASSWORD = 'password'
  5. EMAIL_PORT = 587
  6.    
  7. def send_email(subject, body, recipients, agent_email, bcc=[], attachments=[]):
  8.     recipient_list = []
  9.     if isinstance(recipients, (str, unicode,)):
  10.         recipient_list.append(recipients)
  11.     else:
  12.         recipient_list = recipients
  13.  
  14.     recipient_list = recipient_list + bcc
  15.  
  16.     send_mail(subject, body, settings.EMAIL_FROM, recipient_list)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top