user_ctrl.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:mentii 作者: mentii 项目源码 文件源码
def sendEmail(httpOrigin, email, activationId, mailer):
  '''
  Create a message and send it from our email to
  the passed in email. The message should contain
  a link built with the activationId
  '''
  if activationId is None:
    return
  #Change the URL to the appropriate environment
  host = getProperEnvironment(httpOrigin)
  url = host + '/activation/{0}'.format(activationId)
  message = render_template('registrationEmail.html', url=url)
  #Build Message
  msg = Message('Mentii: Thank You for Creating an Account!', recipients=[email],
      extra_headers={'Content-Transfer-Encoding': 'quoted-printable'}, html=message)
  #Send Email
  mailer.send(msg)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号