public void prepareMail(RunnerParas paras_, List <Client> clients_, string attachment_)
 {
     // Replace to-list if has 'to' input; otherwise use config file input.
     reinitReceiver(paras_.getToList());
     generateMail(paras_.getTradingDays(), clients_);
     addRarAttachment(attachment_);
 }
        private void generateBody(RunnerParas paras_)
        {
            body = "AlgoTradingReporter Execution Report: " + Environment.NewLine;

            List <string> unidentifiedAccounts = StoredProcMgr.MANAGER.getNewClients();

            if (paras_.getUnknownAccounts().Count != 0)
            {
                body += "Unidentified Accounts, possibly new clients." + Environment.NewLine;
                foreach (string account in unidentifiedAccounts)
                {
                    body += account + Environment.NewLine;
                }
            }

            body += (Environment.NewLine + "Log Roots are : " + Environment.NewLine);
            foreach (string root in paras_.getLogRoots())
            {
                body += (root + Environment.NewLine);
            }

            body += Environment.NewLine + "Trading Days are : " + Environment.NewLine;
            foreach (string day in paras_.getTradingDays())
            {
                body += (day + Environment.NewLine);
            }

            if (paras_.getAccounts().Count != 0)
            {
                body += Environment.NewLine + "Accounts are : " + Environment.NewLine;
                foreach (string acct in paras_.getAccounts())
                {
                    body += (acct + Environment.NewLine);
                }
            }

            if (paras_.getInvalidRoots().Count != 0)
            {
                body += "Invalid (Non-Existing) Folders : \n";
                foreach (string root in paras_.getInvalidRoots())
                {
                    body += (root + Environment.NewLine);
                }
            }

            body += Environment.NewLine + "Detailed Execution Report " + Environment.NewLine;
        }