def email_dm(actor_ref, owner_ref, direct_message):
  SITE_NAME = util.get_metadata('SITE_NAME')
  DOMAIN = settings.DOMAIN
  actor_fullname = _full_name(actor_ref)
  fullname = _full_name(owner_ref)

  email_link = ("http://%s/inbox?reply=%s" %
                (settings.DOMAIN, actor_ref.display_nick()))
  
  t = loader.get_template('common/templates/email/email_dm.txt')
  c = template.Context(locals(), autoescape=False)
  message = t.render(c)
  c.autoescape = True
  html_template = loader.get_template(
      'common/templates/email/email_dm.html')
  html_message = html_template.render(c)

  subject = ('Direct message from %s' % actor_fullname)
  return (subject, message, html_message)
dataset/ETHPy150Open CollabQ/CollabQ/common/mail.py/email_dm/original