Merge branch 'dev' of github.com:webnotes/erpnext into dev
diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.js b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.js
index a27ecce..830092b 100644
--- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.js
+++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.js
@@ -20,17 +20,6 @@
 	if (!doc.transaction_date) doc.transaction_date = dateutil.obj_to_str(new Date());
 }
 
-cur_frm.cscript.refresh = function(doc, cdt, cdn) {
-	hide_field('repost_account_balances');
-	hide_field('next_fiscal_year');
-	hide_field('repost');
-
-	if (doc.docstatus == 1) { 
-		unhide_field('repost_account_balances');
-		unhide_field('next_fiscal_year');
-		unhide_field('repost');
-	}
-}
 
 // ***************** Get Account Head *****************
 cur_frm.fields_dict['closing_account_head'].get_query = function(doc, cdt, cdn) {
diff --git a/erpnext/setup/doctype/email_settings/email_settings.py b/erpnext/setup/doctype/email_settings/email_settings.py
index 755b91d..118dba2 100644
--- a/erpnext/setup/doctype/email_settings/email_settings.py
+++ b/erpnext/setup/doctype/email_settings/email_settings.py
@@ -54,24 +54,13 @@
 				webnotes.msgprint(err_msg)
 				raise e
 			
+			# exceptions are handled in smtp_connect
+			sess = out_email.smtp_connect()
+			
 			try:
-				sess = out_email.smtp_connect()
-				
-				try:
-					sess.quit()
-				except:
-					pass
-			except _socket.error, e:
-				# Invalid mail server -- due to refusing connection
-				webnotes.msgprint('Invalid Outgoing Mail Server or Port. Please rectify and try again.')
-				raise e
-			except smtplib.SMTPAuthenticationError, e:
-				webnotes.msgprint('Invalid Login Id or Mail Password. Please rectify and try again.')
-				raise e
-			except smtplib.SMTPException, e:
-				webnotes.msgprint('There is something wrong with your Outgoing Mail Settings. \
-				Please contact us at support@erpnext.com')
-				raise e
+				sess.quit()
+			except:
+				pass
 		
 
 	def validate_incoming(self):