/// <summary>
        /// Executes the service process to send emails
        /// </summary>
        /// <returns>True if process ran OK, False if there was an error</returns>
        public bool EmailServiceWork()
        {
            try
            {
                string emailAccount = string.Empty;
                string emailPassword = string.Empty;
                string emailDomain = string.Empty;
                SettingsModel model = new SettingsModel(_unitOfWork);

                string[] emailConfiguration = model.GetEmailConfiguration();
                emailAccount = emailConfiguration[0];
                emailPassword = emailConfiguration[1];
                emailDomain = emailConfiguration[2];

                using (mailUtility = new MailUtility(emailAccount, emailPassword, emailDomain))
                {

                    // Gets the list of pendingl emails
                    IList<CS_Email> pendingEmails = ListAllPendingEmails();
                    foreach (CS_Email email in pendingEmails)
                    {
                        try
                        {
                            bool emailed = mailUtility.SendEmail(email.Subject, email.Body, email.Receipts, "", email.ID);

                            if (emailed)
                                UpdateStatusEmail(email, Globals.EmailService.Status.Sent);
                        }
                        catch (Exception ex)
                        {
                            Logger.Write(string.Format("An error has ocurred while trying to send the Email with ID {0}!\n{1}\n{2}", email.ID, ex.InnerException, ex.StackTrace));
                            UpdateStatusEmail(email, Globals.EmailService.Status.Error);
                        }
                    }
                }

                return true;
            }
            catch (Exception ex)
            {
                Logger.Write(string.Format("An error has ocurred while trying to send the Emails!\n{0}\n{1}", ex.InnerException, ex.StackTrace));

                // This process will not send any emails if there's an error, because it might be an exchange server problem

                return false;
            }
        }