コード例 #1
0
ファイル: mail.py プロジェクト: josezambrana/ContentQ-CMS
def mail_welcome(user):
  params = {'user':user}
  message = mail.get_mail_message('mail_welcome.txt', **params)
  html_message = mail.get_mail_message('mail_welcome.html', **params)

  subject = "Welcome to %s" % ConfigData.get_configdata('SITE_NAME')
  mail.send_mail(user.email, subject, message, html_message=html_message)
コード例 #2
0
ファイル: mail.py プロジェクト: josezambrana/ContentQ-CMS
def email_contact(name, email, message):
  params = {'name':name, 'email':email, 'message':message}
  message = mail.get_mail_message('mail_contact.txt', **params)
  html_message = mail.get_mail_message('mail_contact.html', **params)
  
  subject = "Contact: %s (%s)" % (name, email)
  for to_mail in ContactMessage.get_mails():
    mail.send_mail(to_mail, subject, message, html_message=html_message)
コード例 #3
0
ファイル: mail.py プロジェクト: josezambrana/ContentQ-CMS
def mail_password_instructions(user, code):
  _link = "http://%s%s" % (settings.DOMAIN, reverse("users_passwordreset", args=[code]))
  params = {'user':user, "link": _link}
  message = mail.get_mail_message('mail_password_instructions.txt', **params)
  html_message = mail.get_mail_message('mail_password_instructions.html', **params)

  subject = "Reset your %s password" % settings.SITE_NAME

  mail.send_mail(user.email, subject, message, html_message=html_message)
コード例 #4
0
ファイル: mail.py プロジェクト: josezambrana/ContentQ-CMS
def mail_confirm(user, mail):
  _link = "http://%s%s" % (settings.DOMAIN, reverse("users_validate_email", args=[code]))
  params = {'user':user, "link": _link}
  message = mail.get_mail_message('mail_validate_email.txt', **params)
  html_message = mail.get_mail_message('mail_validate_email.html', **params)

  subject = "Confirm your %s account" % ConfigData.get_configdata('SITE_NAME')
  
  mail.send_mail(user.email, subject, message, html_message=html_message)