예제 #1
0
파일: Program.cs 프로젝트: ZhouAnPing/Mail
        static void sendBatchMail()
        {
            String client = "Training";
            String userName = "******";
            String password = "******";


            MailAdapter mailAdapter = new MailAdapter(client, userName, password,null);
            MailData mailData = new MailData();

            mailData.fromAddress = "*****@*****.**";
            mailData.replyAddress = "*****@*****.**";
            mailData.sender = "优赞(上海)";
            mailData.subject = "邮件测试";
            mailData.mailBody = System.IO.File.ReadAllText("../../Readme.html");

            String contactJson =
                "email#[email protected],surveylink#http://www.google.com,pid#123456-1";
            mailData.ContactJsonList.Add(contactJson);

            contactJson =
                "email#[email protected],surveylink#http://www.google.com,pid#123456-1";
            mailData.ContactJsonList.Add(contactJson);

            mailAdapter.sendBatchMail("T1", mailData);

        }
예제 #2
0
파일: Program.cs 프로젝트: ZhouAnPing/Mail
        static void sendSingleMail()
        {
            String client = "Training";
            String userName = "******";
            String password = "******";
            MailAdapter mailAdapter = new MailAdapter(client, userName, password,null);
            String mailBody = System.IO.File.ReadAllText("../../Readme.html");
            mailAdapter.sendSingleEmail("T1", "23456789", "Test", "*****@*****.**", "*****@*****.**", "Test By An-Ping", mailBody);

        }