Fixed email sending bug introduced recently.