def send_mail_comm(note):
 log.info((u'Sending emails for %s' % note.thread.obj))
 if (note.note_type in comm.EMAIL_SENIOR_REVIEWERS_AND_DEV):
  rev_template = comm.EMAIL_SENIOR_REVIEWERS_AND_DEV[note.note_type]['reviewer']
  email_recipients(get_senior_reviewers(), note, template=rev_template)
  dev_template = comm.EMAIL_SENIOR_REVIEWERS_AND_DEV[note.note_type]['developer']
  email_recipients(get_developers(note), note, template=dev_template)
 else:
  email_recipients(get_recipients(note), note)
  if (note.note_type == comm.DEVELOPER_COMMENT):
   subject = ('%s: %s' % (unicode(comm.NOTE_TYPES[note.note_type]), note.thread.obj.name))
   mail_template = comm.COMM_MAIL_MAP.get(note.note_type, 'generic')
   send_mail_jinja(subject, ('comm/emails/%s.html' % mail_template), get_mail_context(note, None), recipient_list=[settings.MKT_REVIEWS_EMAIL], from_email=settings.MKT_REVIEWERS_EMAIL, perm_setting='app_reviewed')

def send_mail_comm ( note ) : log . info ( ( u'Sending emails for %s' % note . thread . obj ) ) if ( note . note_type in comm . EMAIL_SENIOR_REVIEWERS_AND_DEV ) : rev_template = comm . EMAIL_SENIOR_REVIEWERS_AND_DEV [ note . note_type ] [ 'reviewer' ] email_recipients ( get_senior_reviewers ( ) , note , template = rev_template ) dev_template = comm . EMAIL_SENIOR_REVIEWERS_AND_DEV [ note . note_type ] [ 'developer' ] email_recipients ( get_developers ( note ) , note , template = dev_template ) else : email_recipients ( get_recipients ( note ) , note ) if ( note . note_type == comm . DEVELOPER_COMMENT ) : subject = ( '%s: %s' % ( unicode ( comm . NOTE_TYPES [ note . note_type ] ) , note . thread . obj . name ) ) mail_template = comm . COMM_MAIL_MAP . get ( note . note_type , 'generic' ) send_mail_jinja ( subject , ( 'comm/emails/%s.html' % mail_template ) , get_mail_context ( note , None ) , recipient_list = [ settings . MKT_REVIEWS_EMAIL ] , from_email = settings . MKT_REVIEWERS_EMAIL , perm_setting = 'app_reviewed' )
email utility used globally by the communication dashboard to send emails .