diff --git a/secure/fax_to_email.php b/secure/fax_to_email.php index 6763bae9dc..6ad73757aa 100755 --- a/secure/fax_to_email.php +++ b/secure/fax_to_email.php @@ -373,20 +373,15 @@ if (!function_exists('fax_split_dtmf')) { $smtp['auth'] = $_SESSION['email']['smtp_auth']['text']; $smtp['username'] = $_SESSION['email']['smtp_username']['text']; $smtp['password'] = $_SESSION['email']['smtp_password']['text']; + $smtp['from'] = $_SESSION['email']['smtp_from']['text']; + $smtp['from_name'] = $_SESSION['email']['smtp_from_name']['text']; - if (strlen($_SESSION['fax']['smtp_from']) > 0) { + if (isset($_SESSION['fax']['smtp_from']) && strlen($_SESSION['fax']['smtp_from']['text']) > 0) { $smtp['from'] = $_SESSION['fax']['smtp_from']['text']; } - else { - $smtp['from'] = $_SESSION['email']['smtp_from']['text']; - } - - if (strlen($_SESSION['fax']['smtp_from_name']) > 0) { + if (isset($_SESSION['fax']['smtp_from_name']) && strlen($_SESSION['fax']['smtp_from_name']['text']) > 0) { $smtp['from_name'] = $_SESSION['fax']['smtp_from_name']['text']; } - else { - $smtp['from_name'] = $_SESSION['email']['smtp_from_name']['text']; - } // overwrite with domain-specific smtp server settings, if any if ($domain_uuid != '') {