Beispiel #1
0
 public static void SendEmailTo(List<Model.UserInfo> userList, MailModel mm)
 {
     Model.UserInfo[] listUserEmail = userList.ToArray();
     string[] arrUserEmail = new string[listUserEmail.Length];
     for (int i = 0; i < listUserEmail.Length; i++)
     {
         arrUserEmail[i] = listUserEmail[i].UserEmail;
     }
     mm.MailTo = arrUserEmail;
     smtp = new SMTP(mm);
     smtp.Send();
 }
Beispiel #2
0
 public static void SendEmailTo(List <Model.UserInfo> userList, MailModel mm)
 {
     Model.UserInfo[] listUserEmail = userList.ToArray();
     string[]         arrUserEmail  = new string[listUserEmail.Length];
     for (int i = 0; i < listUserEmail.Length; i++)
     {
         arrUserEmail[i] = listUserEmail[i].UserEmail;
     }
     mm.MailTo = arrUserEmail;
     smtp      = new SMTP(mm);
     smtp.Send();
 }
Beispiel #3
0
        public static void SendEmailToUseCarUsers(List<string> Email, MailModel mm)
        {
            string[] listUserEmail = Email.ToArray();

            mm.MailTo = listUserEmail;
            mm.MailFrom = ConfigurationManager.AppSettings["commomEmail"].ToString();
            mm.Password = ConfigurationManager.AppSettings["emailPassword"].ToString();
            mm.SmtpServer = ConfigurationManager.AppSettings["smtpServer"].ToString();
            mm.SmtpPort = int.Parse(ConfigurationManager.AppSettings["port"].ToString());
            mm.UserName = ConfigurationManager.AppSettings["userName"].ToString();
            mm.MailBcc = null;
            mm.MailCc = null;

            mm.SmtpPort = 25;
            mm.SmtpSsl = false;
            smtp = new SMTP(mm);
            smtp.Send();
        }
Beispiel #4
0
        public static void SendEmailToUseCarUsers(List <string> Email, MailModel mm)
        {
            string[] listUserEmail = Email.ToArray();


            mm.MailTo     = listUserEmail;
            mm.MailFrom   = ConfigurationManager.AppSettings["commomEmail"].ToString();
            mm.Password   = ConfigurationManager.AppSettings["emailPassword"].ToString();
            mm.SmtpServer = ConfigurationManager.AppSettings["smtpServer"].ToString();
            mm.SmtpPort   = int.Parse(ConfigurationManager.AppSettings["port"].ToString());
            mm.UserName   = ConfigurationManager.AppSettings["userName"].ToString();
            mm.MailBcc    = null;
            mm.MailCc     = null;

            mm.SmtpPort = 25;
            mm.SmtpSsl  = false;
            smtp        = new SMTP(mm);
            smtp.Send();
        }
Beispiel #5
0
        public static void SendEmailToUseCarUsers(List<YunShanOA.Model.UseCarModel.usecaranduser> users, MailModel mm)
        {
            usecaranduser[] listUserEmail = users.ToArray();

            string[] arrUserEmail = new string[listUserEmail.Length];
            for (int i = 0; i < listUserEmail.Length; i++)
            {
                arrUserEmail[i] = listUserEmail[i].Email;
            }
            mm.MailTo = arrUserEmail;
            mm.MailFrom = ConfigurationManager.AppSettings["commomEmail"].ToString();
            mm.Password = ConfigurationManager.AppSettings["emailPassword"].ToString();
            mm.SmtpServer = ConfigurationManager.AppSettings["smtpServer"].ToString();
            mm.SmtpPort = int.Parse(ConfigurationManager.AppSettings["port"].ToString());
            mm.UserName = ConfigurationManager.AppSettings["userName"].ToString();
            mm.MailBcc = null;
            mm.MailCc = null;

            mm.SmtpPort = 25;
            mm.SmtpSsl = false;
            smtp = new SMTP(mm);
            smtp.Send();
        }
Beispiel #6
0
        public static void SendEmailToUseCarUsers(List <YunShanOA.Model.UseCarModel.usecaranduser> users, MailModel mm)
        {
            usecaranduser[] listUserEmail = users.ToArray();

            string[] arrUserEmail = new string[listUserEmail.Length];
            for (int i = 0; i < listUserEmail.Length; i++)
            {
                arrUserEmail[i] = listUserEmail[i].Email;
            }
            mm.MailTo     = arrUserEmail;
            mm.MailFrom   = ConfigurationManager.AppSettings["commomEmail"].ToString();
            mm.Password   = ConfigurationManager.AppSettings["emailPassword"].ToString();
            mm.SmtpServer = ConfigurationManager.AppSettings["smtpServer"].ToString();
            mm.SmtpPort   = int.Parse(ConfigurationManager.AppSettings["port"].ToString());
            mm.UserName   = ConfigurationManager.AppSettings["userName"].ToString();
            mm.MailBcc    = null;
            mm.MailCc     = null;

            mm.SmtpPort = 25;
            mm.SmtpSsl  = false;
            smtp        = new SMTP(mm);
            smtp.Send();
        }