瀏覽代碼

Fix e-mail attachment handling / conversion & allow local emails to be valid (#1921)

* Enable local email addresses to be valid. E.g required for local Fax submission.

* Fix filenames & allow spaces in filenames.

* Fix attachment file names.

* Revert "Fix filenames & allow spaces in filenames."

This reverts commit 0908f42cc72e64dfa4fc44d424a7584da757e6be.
See commit ecf490ff79a460477e9e4510d57e4fed7951eca2 for the proper fix.
hargut 9 年之前
父節點
當前提交
5c7d3af96f
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      resources/functions.php

+ 1 - 1
resources/functions.php

@@ -1101,7 +1101,7 @@ function number_pad($number,$n) {
 // validate email address syntax
 	if(!function_exists('valid_email')) {
 		function valid_email($email) {
-			$regex = '/^[A-z0-9][\w.-]*@[A-z0-9][\w\-\.]+\.[A-z0-9]{2,6}$/';
+			$regex = '/^[A-z0-9][\w.-]*@[A-z0-9][\w\-\.]+(\.[A-z0-9]{2,6})?$/';
 			if ($email != "" && preg_match($regex, $email) == 1) {
 				return true; // email address has valid syntax
 			}