Fixed a logical error that caused no email notifications to be sent out.