diff options
Diffstat (limited to 'packages/freeswitch/freeswitch_mailto.tmp')
-rw-r--r-- | packages/freeswitch/freeswitch_mailto.tmp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/packages/freeswitch/freeswitch_mailto.tmp b/packages/freeswitch/freeswitch_mailto.tmp index 8ecc773c..3c8dbe1f 100644 --- a/packages/freeswitch/freeswitch_mailto.tmp +++ b/packages/freeswitch/freeswitch_mailto.tmp @@ -36,9 +36,12 @@ global $config; $tmp_smtphost = $config['installedpackages']['freeswitchsettings']['config'][0]['smtphost']; $tmp_smtpsecure = $config['installedpackages']['freeswitchsettings']['config'][0]['smtpsecure']; //options "", "TLS", "SSL" +$tmp_smtpsecure = strtolower($tmp_smtpsecure); $tmp_smtpauth = $config['installedpackages']['freeswitchsettings']['config'][0]['smtpauth']; // SMTP authentication: true or false $tmp_smtpusername = $config['installedpackages']['freeswitchsettings']['config'][0]['smtpusername']; $tmp_smtppassword = $config['installedpackages']['freeswitchsettings']['config'][0]['smtppassword']; +$tmp_smtpfrom = $config['installedpackages']['freeswitchsettings']['config'][0]['smtpfrom']; + ini_set(max_execution_time,900); //15 minutes @@ -185,7 +188,7 @@ ob_start(); $mail = new PHPMailer(); - $mail->IsSMTP(); // set mailer to use SMTP + $mail->IsSMTP(); // set mailer to use SMTP $mail->SMTPAuth = $tmp_smtpauth; // turn on/off SMTP authentication $mail->Host = $tmp_smtphost; if (strlen($tmp_smtpsecure)>0) { @@ -194,8 +197,10 @@ ob_start(); if ($tmp_smtpauth) { $mail->Username = $tmp_smtpusername; $mail->Password = $tmp_smtppassword; - } - $mail->From = $var['From']; + } + + + $mail->From = $tmp_smtpfrom; $mail->FromName = $var['From']; $mail->Subject = $var['Subject']; $mail->AltBody = $textplain; // optional, comment out and test |