Example #1
0
        public void Test()
        {
            SendServerConfiguration sendServer = new SendServerConfiguration
            {
                IsSsl          = false,
                SmtpHost       = "smtp.163.com",
                SmtpPort       = 25,
                SenderAccount  = "*****@*****.**",
                SenderPassword = "******"
            };
            EmailBodyModel model = new EmailBodyModel
            {
                FromAddress = "*****@*****.**",
                ToAddress   = "*****@*****.**",
                Subject     = "下午会议室开会",
                IsBodyHtml  = false,
                Body        = "请各位准时参加下午15:30的会议。",
                Attachments = new List <string> {
                    @"D:\Test\注意事项.txt", @"D:\Test\会议记录模板.xlsx"
                }
            };

            EmailUtils.SendEmail(model, sendServer);
        }