cleanup get_support_ticket
diff --git a/support/doctype/support_ticket/get_support_mails.py b/support/doctype/support_ticket/get_support_mails.py
index bb0c008..12c2fbc 100644
--- a/support/doctype/support_ticket/get_support_mails.py
+++ b/support/doctype/support_ticket/get_support_mails.py
@@ -64,7 +64,7 @@
 				
 		make(content=mail.content, sender=mail.from_email, 
 			doctype="Support Ticket",
-			name=thread_id, lead = st.doc.lead, contact=st.doc.contact)
+			name=thread_id, lead = ticket.doc.lead, contact=ticket.doc.contact)
 
 	def send_auto_reply(self, d):
 		signature = self.email_settings.fields.get('support_signature') or ''