Browse code

fix for not sending emails in some cases (antispam)

Jimako authored on 2020/03/06 04:51:42
Showing 1 changed files
... ...
@@ -28,8 +28,9 @@ if(!defined("_CHARSET")) exit( );
28 28
 
29 29
 
30 30
 function sendemail($to_name,$to_email,$from_name,$from_email,$subject,$message,$type="plain",$cc="",$bcc="") {
31
-
32
-	global $language, $smtp_host, $smtp_username, $smtp_password;
31
+                 
32
+	global $language, $smtp_host, $smtp_username, $smtp_password, $siteemail;     
33
+   
33 34
 	// Check for hackers and spammers and bad input
34 35
 	if(!isset($_SERVER['HTTP_USER_AGENT'])) return false;
35 36
 	$badStrings = array("Content-Type:", "MIME-Version:", "Content-Transfer-Encoding:", "bcc:", "cc:");
... ...
@@ -71,7 +72,7 @@ function sendemail($to_name,$to_email,$from_name,$from_email,$subject,$message,$
71 72
 		$mail->Password = $smtp_password;
72 73
 	}
73 74
 	$mail->CharSet = _CHARSET;
74
-	$mail->From = $from_email;
75
+	$mail->From = $siteemail;
75 76
 	$mail->FromName = $from_name;
76 77
 	$mail->AddAddress($to_email, $to_name);
77 78
 	$mail->AddReplyTo($from_email, $from_name);