Tweaked to work with the shitty design of PEAR mail mime