diff options
author | Mark Crane <mcrane@pfsense.org> | 2009-01-31 09:12:23 +0000 |
---|---|---|
committer | Mark Crane <mcrane@pfsense.org> | 2009-01-31 09:12:23 +0000 |
commit | d264affd78ce4e5d881c98db98c336c21474f573 (patch) | |
tree | 66502cc621d5a8b5c3d14c2c0914584386a26759 /packages/freeswitch/freeswitch_mailto.tmp | |
parent | 05ab46353f2460d272082cc43a41c99f5fdc4637 (diff) | |
download | pfsense-packages-d264affd78ce4e5d881c98db98c336c21474f573.tar.gz pfsense-packages-d264affd78ce4e5d881c98db98c336c21474f573.tar.bz2 pfsense-packages-d264affd78ce4e5d881c98db98c336c21474f573.zip |
pfSense FreeSWITCH package add ability to send voicemail to multiple accounts for each extension. Seperate emails with a comma or a semi-colon.
Diffstat (limited to 'packages/freeswitch/freeswitch_mailto.tmp')
-rw-r--r-- | packages/freeswitch/freeswitch_mailto.tmp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/packages/freeswitch/freeswitch_mailto.tmp b/packages/freeswitch/freeswitch_mailto.tmp index f24ce26a..23645570 100644 --- a/packages/freeswitch/freeswitch_mailto.tmp +++ b/packages/freeswitch/freeswitch_mailto.tmp @@ -206,7 +206,15 @@ ob_start(); $mail->AltBody = $textplain; // optional, comment out and test $mail->MsgHTML($texthtml); - $mail->AddAddress($var['To']); + + $tmp_to = $var['To']; + $tmp_to = str_replace(";", ",", $tmp_to); + $tmp_to_array = split(",", $tmp_to); + foreach($tmp_to_array as $tmp_to_row) { + if (strlen($tmp_to_row) > 0) { + $mail->AddAddress($tmp_to_row); + } + } if (strlen($strwav) > 0) { //$mail->AddAttachment("/usr/local/freeswitch/data/domain/example.wav"); // attachment |