support fixes
diff --git a/support/doctype/support_ticket/__init__.py b/support/doctype/support_ticket/__init__.py
index 85ee89a..316eff8 100644
--- a/support/doctype/support_ticket/__init__.py
+++ b/support/doctype/support_ticket/__init__.py
@@ -46,7 +46,7 @@
 				SELECT name
 				FROM `tabSupport Ticket`
 				WHERE name=%s AND raised_by REGEXP %s
-				""" , (thread_id, '(' + email_id + ')'))
+				""" , (thread_id, '(' + mail.from_email + ')'))
 			if exists and exists[0] and exists[0][0]:
 				st = webnotes.get_obj('Support Ticket', thread_id)