Perhaps $mailheader is being used by the hosting company as a global php variable which would override a local one, if I'm not mistaken....perhaps try it with a rephrased variable name