module: email_template

Create email notices to each Reviewer describing specific assignments

class Assign_GUP.email_template.EmailTemplate[source]

Bases: object

Support the creation of custom emails to each Reviewer from template and fields

It is possible to create and use custom fields. Be sure that the custom fields are uniquely identifiable to avoid replacing the wrong text.

importXml(filename)[source]
Parameters:filename (str) – name of XML file with email template and keywords
mail_merge(**kw_dict)[source]

create one email with a mail merge of self.keyword_dict and kw_dict into self.email_template

suggest defining at least these four keywords, to be applied for each reviewer during mail merge step (values filled in programmatically):

FULL_NAME = 'Ima Reviewer',
EMAIL = 'reviewer@institution.net',
ASSIGNED_PRIMARY_PROPOSALS = '11111 22222 33333',
ASSIGNED_SECONDARY_PROPOSALS = '44444 55555 66666',
mass_merge(reviewers, **kw)[source]

create emails for all Reviewers, return as a dictionary by sort_name

Parameters:reviewers (obj) – instance of revu_mvc_data.AGUP_Reviewers_List
writeXmlNode(root_node)[source]

write email template data to the XML document

Parameters:root_node (obj) – XML node to contain this data