Replaced MIME generation with a better package