diff --git a/support/doctype/newsletter/newsletter.js b/support/doctype/newsletter/newsletter.js
index 8cbf8fc..0531196 100644
--- a/support/doctype/newsletter/newsletter.js
+++ b/support/doctype/newsletter/newsletter.js
@@ -1,6 +1,17 @@
 // Copyright (c) 2013, Web Notes Technologies Pvt. Ltd.
 // License: GNU General Public License v3. See license.txt
 
+cur_frm.cscript.onload = function(doc) {
+	return wn.call({
+		method: "support.doctype.newsletter.newsletter.get_lead_options",
+		type: "GET",
+		callback: function(r) {
+			set_field_options("lead_source", r.message.sources.join("\n"))
+			set_field_options("lead_status", r.message.statuses.join("\n"))
+		}
+	});
+}
+
 cur_frm.cscript.refresh = function(doc) {
 	erpnext.hide_naming_series();
 	if(!doc.__islocal && !cint(doc.email_sent) && !doc.__unsaved
@@ -11,18 +22,42 @@
 			});
 		})
 	}
+	
+	cur_frm.cscript.setup_dashboard();
 
 	if(doc.__islocal && !doc.send_from) {
 		cur_frm.set_value("send_from", 
 			repl("%(fullname)s <%(email)s>", wn.user_info(doc.owner)));
 	}
-	
-	return wn.call({
-		method: "support.doctype.newsletter.newsletter.get_lead_options",
-		type: "GET",
-		callback: function(r) {
-			set_field_options("lead_source", r.message.sources.join("\n"))
-			set_field_options("lead_status", r.message.statuses.join("\n"))
+}
+
+cur_frm.cscript.setup_dashboard = function() {
+	cur_frm.dashboard.reset();
+	if(!cur_frm.doc.__islocal && cint(cur_frm.doc.email_sent) && cur_frm.doc.__status_count) {
+		var stat = cur_frm.doc.__status_count;
+		var total = wn.utils.sum($.map(stat, function(v) { return v; }));
+		if(total) {
+			$.each(stat, function(k, v) {
+				stat[k] = flt(v * 100 / total, 2);
+			});
+			
+			cur_frm.dashboard.add_progress("Status", [
+				{
+					title: stat["Sent"] + "% Sent",
+					width: stat["Sent"],
+					progress_class: "progress-bar-success"
+				},
+				{
+					title: stat["Sending"] + "% Sending",
+					width: stat["Sending"],
+					progress_class: "progress-bar-warning"
+				},
+				{
+					title: stat["Error"] + "% Error",
+					width: stat["Error"],
+					progress_class: "progress-bar-danger"
+				}
+			]);
 		}
-	})
+	}
 }
\ No newline at end of file
diff --git a/support/doctype/newsletter/newsletter.py b/support/doctype/newsletter/newsletter.py
index cdfd370..b201cc5 100644
--- a/support/doctype/newsletter/newsletter.py
+++ b/support/doctype/newsletter/newsletter.py
@@ -11,6 +11,12 @@
 class DocType():
 	def __init__(self, d, dl):
 		self.doc, self.doclist = d, dl
+		
+	def onload(self):
+		if self.doc.email_sent:
+			self.doc.fields["__status_count"] = dict(webnotes.conn.sql("""select status, count(*)
+				from `tabBulk Email` where ref_doctype=%s and ref_docname=%s
+				group by status""", (self.doc.doctype, self.doc.name))) or None
 
 	def test_send(self, doctype="Lead"):
 		self.recipients = self.doc.test_email_id.split(",")
@@ -74,7 +80,8 @@
 		
 		send(recipients = self.recipients, sender = sender, 
 			subject = self.doc.subject, message = self.doc.message,
-			doctype = self.send_to_doctype, email_field = "email_id")
+			doctype = self.send_to_doctype, email_field = "email_id",
+			ref_doctype = self.doc.doctype, ref_docname = self.doc.name)
 
 		webnotes.conn.auto_commit_on_many_writes = False
 
@@ -91,8 +98,10 @@
 @webnotes.whitelist()
 def get_lead_options():
 	return {
-		"sources": ["All"] + webnotes.conn.sql_list("""select distinct source from tabLead"""),
-		"statuses": ["All"]+ webnotes.conn.sql_list("""select distinct status from tabLead""")
+		"sources": ["All"] + filter(None, 
+			webnotes.conn.sql_list("""select distinct source from tabLead""")),
+		"statuses": ["All"] + filter(None, 
+			webnotes.conn.sql_list("""select distinct status from tabLead"""))
 	}
 
 
diff --git a/website/helpers/blog.py b/website/helpers/blog.py
index 005bdb8..f8f7a42 100644
--- a/website/helpers/blog.py
+++ b/website/helpers/blog.py
@@ -41,7 +41,7 @@
 	import webnotes.utils
 	
 	for res in result:
-		from webnotes.utils import global_date_format, get_fullname
+		from webnotes.utils import global_date_format
 		res['published'] = global_date_format(res['creation'])
 		if not res['content']:
 			res['content'] = webnotes.webutils.get_html(res['page_name'])
@@ -101,28 +101,11 @@
 		doctype='Comment', 
 		email_field='comment_by', 
 		subject='New Comment on Blog: ' + blog.title, 
-		message='%(comment)s<p>By %(comment_by_fullname)s</p>' % args)
+		message='%(comment)s<p>By %(comment_by_fullname)s</p>' % args,
+		ref_doctype='Blog Post', ref_docname=blog.name)
 	
 	return comment_html.replace("\n", "")
 
-@webnotes.whitelist(allow_guest=True)
-def add_subscriber(name, email_id):
-	"""add blog subscriber to lead"""
-	name = webnotes.conn.sql("""select name from tabLead where email_id=%s""", email)
-	
-	from webnotes.model.doc import Document
-	if name:
-		lead = Document('Lead', name[0][0])
-	else:
-		lead = Document('Lead')
-	
-	if not lead.source: lead.source = 'Blog'
-	lead.unsubscribed = 0
-	lead.blog_subscriber = 1
-	lead.lead_name = name
-	lead.email_id = email
-	lead.save()
-
 def get_blog_content(blog_page_name):
 	import webnotes.webutils
 	content = webnotes.webutils.get_html(blog_page_name)
