Fax Server: Add ability to authorize domains for Email-to-Fax.

This commit is contained in:
fusionate
2020-12-02 12:20:10 -07:00
parent ae3ade1714
commit 0dc478ac00
3 changed files with 8 additions and 6 deletions
+3 -3
View File
@@ -170,9 +170,9 @@ if (is_array($result) && @sizeof($result) != 0) {
$metadata[0]['from'] = strtolower($tmp[0]['mailbox']."@".$tmp[0]['host']);
//check sender
$sender_authorized = false;
if (in_array($metadata[0]['from'],$authorized_senders)) { $sender_authorized = true; }
$sender_email = $metadata[0]['from'];
$sender_domain = explode('@', $sender_email)[1];
$sender_authorized = in_array($sender_email, $authorized_senders) || in_array($sender_domain, $authorized_senders) ? true : false;
if ($sender_authorized) {
//add multi-lingual support