Undeclared  variable causing a warning and a 'Cannot modify headers' error when passing a BCC header