Fix python formatting bug / Not sending emails