예제 #1
0
        public ActionResult File(CopRevenueGov2.Models.SessionMutiuserTestModel model)
        {
            RevFuncSrv r = new RevFuncSrv();

            r.WriteDebugFile("ABCD_TEST.txt", "THIS IS FILE CREATE TEST ... ");
            return(View("~/views/web/testpages/SessionMutiUserTest.aspx", model));
        }
예제 #2
0
        public void  Send()
        {
            smtpClient = new SmtpClient(Host);
            mailMsg    = new MailMessage();

            for (int i = 0; ToAddress != null && i < ToAddress.Count; i++)
            {
                mailMsg.To.Add(ToAddress[i]);
            }

            for (int i = 0; CCAddress != null && i < CCAddress.Count; i++)
            {
                mailMsg.CC.Add(CCAddress[i]);
            }

            if (mailMsg.To.Count > 0)
            {
                mailMsg.Subject = Subject;
                mailMsg.Body    = Body;
                mailMsg.From    = new MailAddress(From, "phila.gov");
                if (AttachmentFilePath != null)
                {
                    Attachment attachFile = new Attachment(AttachmentFilePath);
                    mailMsg.Attachments.Add(attachFile);
                }
                mailMsg.IsBodyHtml = IsHTML;
                try
                {
                    smtpClient.Send(mailMsg);
                }
                catch (Exception ex)
                {
                    RevFuncSrv rev = new RevFuncSrv();
                    rev.WriteDebugFile("MAIL_SEND_FAILED", mailMsg +
                                       Environment.NewLine + Environment.NewLine + "ERROR : *****************************" +
                                       ex.StackTrace.ToString());
                }
            }
        }