fixed campaign_settings query when sending emails