diff options
author | mcrane <mctch@yahoo.com> | 2009-07-01 01:53:23 -0600 |
---|---|---|
committer | mcrane <mctch@yahoo.com> | 2009-07-01 01:57:57 -0600 |
commit | 2e9f38ff4afd66b48d9782960b2c6cfed0d4d06a (patch) | |
tree | 7e350b08961603199cc6ce112ae9aa5cb58f9a83 /config/freeswitch/fax_to_email.tmp | |
parent | 0033e921a3ba48df680e38bff0ee23032ae8127f (diff) | |
download | pfsense-packages-2e9f38ff4afd66b48d9782960b2c6cfed0d4d06a.tar.gz pfsense-packages-2e9f38ff4afd66b48d9782960b2c6cfed0d4d06a.tar.bz2 pfsense-packages-2e9f38ff4afd66b48d9782960b2c6cfed0d4d06a.zip |
FreeSWITCH package smtp auth and tls previously worked but plain smtp needed a bug fix, adjust huntgroup and ivr, fix a bug on huntgroup that prevented it from working completely when there is more than one huntgroup.
Diffstat (limited to 'config/freeswitch/fax_to_email.tmp')
-rw-r--r-- | config/freeswitch/fax_to_email.tmp | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/config/freeswitch/fax_to_email.tmp b/config/freeswitch/fax_to_email.tmp index fec291fb..fcd6af06 100644 --- a/config/freeswitch/fax_to_email.tmp +++ b/config/freeswitch/fax_to_email.tmp @@ -1,7 +1,7 @@ <?php /* $Id$ */ /* - freeswitch_mailto.php + fax_to_email.php Copyright (C) 2008 Mark J Crane All rights reserved. @@ -34,8 +34,8 @@ require_once("/etc/inc/config.inc"); require_once("/usr/local/pkg/freeswitch.inc"); global $config; -//ob_end_clean(); -//ob_start(); +ob_end_clean(); +ob_start(); echo "\n---------------------------------\n"; @@ -99,14 +99,15 @@ $tmp_smtpfromname = $config['installedpackages']['freeswitchsettings']['config'] ini_set(max_execution_time,900); //15 minutes ini_set('memory_limit', '96M'); -//$fd = fopen("php://stdin", "r"); -//$email = file_get_contents ("php://stdin"); +$fd = fopen("php://stdin", "r"); -//fclose($fd); +$email = file_get_contents ("php://stdin"); -//if($fd){ +fclose($fd); + +if($fd){ $fp = fopen("/tmp/faxtoemail.txt", "w"); -//} +} @@ -122,19 +123,22 @@ ini_set('memory_limit', '96M'); $mail = new PHPMailer(); $mail->IsSMTP(); // set mailer to use SMTP - $mail->SMTPAuth = $tmp_smtpauth; // turn on/off SMTP authentication + if ($tmp_smtpauth == "true") { + $mail->SMTPAuth = $tmp_smtpauth; // turn on/off SMTP authentication + } $mail->Host = $tmp_smtphost; if (strlen($tmp_smtpsecure)>0) { $mail->SMTPSecure = $tmp_smtpsecure; } - if ($tmp_smtpauth) { + if ($tmp_smtpusername) { $mail->Username = $tmp_smtpusername; $mail->Password = $tmp_smtppassword; } + $mail->SMTPDebug = 2; - echo "tmp_smtpfrom: $tmp_smtpfrom\n"; - echo "tmp_smtpfromname: $tmp_smtpfromname\n"; - echo "tmp_subject: $tmp_subject\n"; + echo "tmp_smtpfrom: $tmp_smtpfrom\n"; + echo "tmp_smtpfromname: $tmp_smtpfromname\n"; + echo "tmp_subject: $tmp_subject\n"; $mail->From = $tmp_smtpfrom; $mail->FromName = $tmp_smtpfromname; @@ -169,8 +173,8 @@ ini_set('memory_limit', '96M'); } -//$content = ob_get_contents(); //get the output from the buffer -//ob_end_clean(); //clean the buffer +$content = ob_get_contents(); //get the output from the buffer +ob_end_clean(); //clean the buffer fwrite($fp, $content); fclose($fp); |