added detection for html header on mail