Skip to content

Commit

Permalink
Update v_mailto.php
Browse files Browse the repository at this point in the history
  • Loading branch information
markjcrane authored Feb 23, 2018
1 parent a7cc0c9 commit e5ea07f
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions secure/v_mailto.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,17 +145,14 @@ function remove_tags($string) {
$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 (isset($_SESSION['voicemail']['smtp_from'])) {
if (isset($_SESSION['voicemail']['smtp_from']) && strlen($_SESSION['voicemail']['smtp_from']['text']) > 0) {
$smtp['from'] = $_SESSION['voicemail']['smtp_from']['text'];
} else {
$smtp['from'] = $_SESSION['email']['smtp_from']['text'];
}

if (isset($_SESSION['voicemail']['smtp_from_name'])) {
$smtp['from_name'] = $_SESSION['voicemail']['smtp_from_name']['text'];
} else {
$smtp['from_name'] = $_SESSION['email']['smtp_from_name']['text'];
if (isset($_SESSION['voicemail']['smtp_from_name']) && strlen($_SESSION['voicemail']['smtp_from_name']['text']) > 0) {
$smtp['from_name'] = $_SESSION['voicemail']['smtp_from_name']['text'];
}

// overwrite with domain-specific smtp server settings, if any
Expand Down

0 comments on commit e5ea07f

Please sign in to comment.