def email_recipients(recipients, note, template=None, extra_context=None):
 subject = ('%s: %s' % (unicode(comm.NOTE_TYPES[note.note_type]), note.thread.obj.name))
 for (email, user_id, tok) in tokenize_recipients(recipients, note.thread):
  headers = {}
  if tok:
   headers['Reply-To'] = '{0}{1}@{2}'.format(comm.REPLY_TO_PREFIX, tok, settings.POSTFIX_DOMAIN)
  mail_template = (template or comm.COMM_MAIL_MAP.get(note.note_type, 'generic'))
  context = get_mail_context(note, user_id)
  context.update((extra_context or {}))
  send_mail_jinja(subject, ('comm/emails/%s.html' % mail_template), context, recipient_list=[email], from_email=settings.MKT_REVIEWERS_EMAIL, perm_setting='app_reviewed', headers=headers)

def email_recipients ( recipients , note , template = None , extra_context = None ) : subject = ( '%s: %s' % ( unicode ( comm . NOTE_TYPES [ note . note_type ] ) , note . thread . obj . name ) ) for ( email , user_id , tok ) in tokenize_recipients ( recipients , note . thread ) : headers = { } if tok : headers [ 'Reply-To' ] = '{0}{1}@{2}' . format ( comm . REPLY_TO_PREFIX , tok , settings . POSTFIX_DOMAIN ) mail_template = ( template or comm . COMM_MAIL_MAP . get ( note . note_type , 'generic' ) ) context = get_mail_context ( note , user_id ) context . update ( ( extra_context or { } ) ) send_mail_jinja ( subject , ( 'comm/emails/%s.html' % mail_template ) , context , recipient_list = [ email ] , from_email = settings . MKT_REVIEWERS_EMAIL , perm_setting = 'app_reviewed' , headers = headers )
given a list of tuple of user_id/user_email .