cc1  v2.1
CC1 source code docs
 All Classes Namespaces Files Functions Variables Pages
src.clm.utils.mail Namespace Reference

Functions

def email_error
 Decorator for catching exception with sending emails' error.
def render_from_template_to_string
def send
def send_activation_confirmation_email
def send_activation_email
def send_admin_registration_notification
def send_block_email
def send_reset_password_mail

Detailed Description

Author
Piotr Wójcik
Date
3.12.2010

Function Documentation

def src.clm.utils.mail.email_error (   f)

Decorator for catching exception with sending emails' error.

Decorated function's declaration
@email_error
function (request, *args, **kw)
Decorated function's call
function (request, *arg, **kw)

Definition at line 54 of file mail.py.

def src.clm.utils.mail.render_from_template_to_string (   template_filename,
  ctx_dict = {} 
)
Parameters
template_filename(string) path to template of the email
ctx_dict(dict) params to be filled in the email

Renders strings which can be sent as email contents (basing on template and data to be filled in).

Exceptions
CLMException('clm_template_create')

Definition at line 188 of file mail.py.

def src.clm.utils.mail.send (   to_address,
  msg_text,
  subject 
)
Parameters
to_address(string) addressee of the email
msg_text(string) contents of the email
subject(string) subject of the email

Sends email via STMP server.

Definition at line 74 of file mail.py.

def src.clm.utils.mail.send_activation_confirmation_email (   user,
  wi_data 
)
Parameters
user(string) username of the user to activate
wi_data(dict),
fields:
  • site_domain (string)
  • site_name (string)

Sends confirmation email to user as admin confirms user's activation.

Definition at line 111 of file mail.py.

def src.clm.utils.mail.send_activation_email (   activation_key,
  user,
  wi_data 
)
Parameters
activation_key(string) activation key to be sent
user(string) username of the user to activate
wi_dataSends email with activation key to registred user.

Definition at line 90 of file mail.py.

def src.clm.utils.mail.send_admin_registration_notification (   user,
  wi_data 
)
Parameters
user
wi_data(dict),
fields:
  • site_name (string)

Sends notification to admin about a newly registered user.

Definition at line 129 of file mail.py.

def src.clm.utils.mail.send_block_email (   user,
  block,
  wi_data 
)
Parameters
user(string) username of the user to reset password
block(boolean) whether to block or unblock.
wi_data(dict),
fields:
  • site_name (string)

Definition at line 166 of file mail.py.

def src.clm.utils.mail.send_reset_password_mail (   user,
  token,
  wi_data 
)
Parameters
user(string) username of the user to reset password
token(string)
wi_data(dict),
fields:
  • site_domain (string)
  • site_name (string)

Sends mail for password reset.

Definition at line 149 of file mail.py.