osclass/OSClass — Issue #23: Bug in osc_send_mail, module utils.php
Author: steveh57
Created: 2011-11-12 13:27:04+00:00
State: open

Seems to be a problem with the add_bcc option in this function. See http://forums.osclass.org/index.php/topic,4510.0.html

1) add_bcc is misspelt as add_bbc which is at least confusing
2) if called with a string of addresses, separated by commas, as in the osclassmail plugin, it doesn't work (possibly it was never meant to - in which case this would be an enhancement).

I fixed this as follows:
Replace line 258
if ( isset($params['add_bbc']) ) $mail->AddBCC($params['add_bbc']);
with
if ( isset($params['add_bcc']) ) {
$bcc = explode(',', $params['add_bcc']);
foreach ($bcc as $b ) {
$mail->AddBCC($b);
}
}

The only place in osclass I can see this is used is in ItemActions which also seems to get muddled between bbc and bcc so probably doesn't work properly either.