protected function _addAddress($email, $name, $type) {

        $type = '_'.$type;

        $allowed = array(
            '_sender',
            '_from',
            '_to',
            '_cc',
            '_bcc',
            '_reply_to'
        );

        if (in_array($type, $allowed)) {
            if ($name != '') {
                $this->{$type}[$email] = $name;
            } else {
                $this->{$type}[] = $email;
            }
        }
    }
protected function _addAddress($email, $name, $type) {

        $type = '_'.$type;

        $allowed = array(
            '_sender',
            '_from',
            '_to',
            '_cc',
            '_bcc',
            '_reply_to'
        );

        if (in_array($type, $allowed)) {
            if ($name != '') {
                $this->{$type}[$email] = $name;
            } else {
                $this->{$type}[] = $email;
            }
        }
    }
protected function _addAddress ( $ email , $ name , $ type ) { $ type = '_' . $ type ; $ allowed = array ( '_sender' , '_from' , '_to' , '_cc' , '_bcc' , '_reply_to' ) ; if ( in_array ( $ type , $ allowed ) ) { if ( $ name != '' ) { $ this -> { $ type } [ $ email ] = $ name ; } else { $ this -> { $ type } [ ] = $ email ; } } }
Adds an address

@param string email address format
@param string sender's name
@param string 'recipient' OR 'cc' OR 'bcc' OR 'replyTo'

@return void
Adds an address