First stab at fixing encoding issues with emails
Fixed return value of parts if clause.