Corrected email_settings pull from database