Fix emails not being formatted correctly