added Email List to Newsletter

This commit is contained in:
Anand Doshi
2012-12-06 13:13:05 +05:30
parent b936039c79
commit 39652843bb
4 changed files with 63 additions and 24 deletions

View File

@@ -119,8 +119,6 @@ def add_comment(args=None):
send(recipients=list(set(commentors + [blog['owner']])),
doctype='Comment',
email_field='comment_by',
first_name_field="comment_by_fullname",
last_name_field="NA",
subject='New Comment on Blog: ' + blog['title'],
message='%(comment)s<p>By %(comment_by_fullname)s</p>' % args)

View File

@@ -44,8 +44,7 @@ class DocType(website.web_page.Page):
# send the blog
send(recipients = recipients, doctype='Lead', email_field='email_id',
first_name_field = 'lead_name', last_name_field="", subject=self.doc.title,
message = markdown(content))
subject=self.doc.title, message = markdown(content))
webnotes.conn.set(self.doc, 'email_sent', 1)
webnotes.msgprint("""Scheduled to send to %s subscribers""" % len(recipients))