private void SendAssignmentEmail(Reviewer to, JobApplication applicant, ApiJob job)
        {
            var email = new ReviewApplicationEmail()
            {
                Reviewer       = to,
                JobApplication = applicant,
                Job            = job,
            };

            BackgroundEmailService.Create().Send(email);
            System.Diagnostics.Trace.WriteLine("New review email has been sent to the reviewer {0}", email.Reviewer.Name);
        }
        private void SendEmailForReferral(JobApplication applicant, ApiJob job)
        {
            if (applicant == null || applicant.Source != ApplicantSources.Referral)
            {
                return;
            }
            var referralEmail = new NotificationOfNewReferralEmail()
            {
                Applicant = applicant,
                Job       = job,
                SendTo    = AppConfigsProvider.ReferralsHandlingConfigs.ReportToEmails
            };

            BackgroundEmailService.Create().Send(referralEmail);
        }