using crypto; using Essensoft.Paylink.Alipay.Domain; using LanguageExt.Pipes; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using static SKIT.FlurlHttpClient.Wechat.Api.Models.WxaBusinessPerformanceBootResponse.Types.Data.Types; namespace Ds.Module.Mailkit { public class EmailOptions { public string FromAddress { get; set; } public string ToAddress { get; set; } public string Host { get; set; } public string UserName { get; set; } public string Password { get; set; } //optionBuilder.UseMailKit(new MailKitOptions() //{ // //get options from sercets.json // Server = Configuration.GetValue("EmailOptions:Host"), // Port = Configuration.GetValue("EmailOptions:Port"), 改非25端口 // SenderName = Configuration.GetValue("EmailOptions:SenderName"), // SenderEmail = Configuration.GetValue("EmailOptions:FromAddress"), // // can be optional with no authentication // Account = Configuration.GetValue("EmailOptions:UserName"), // Password = Configuration.GetValue("EmailOptions:Password"), // // enable ssl or tls // Security = true //}); // new Email() // { // SmtpServer = "smtp.masuit.com",// SMTP服务器 // SmtpPort = 25, // SMTP服务器端口 // EnableSsl = true,//使用SSL // Username = "admin@masuit.com",// 邮箱用户名 // Password = "123456",// 邮箱密码 // Tos = "10000@qq.com,10001@qq.com", //收件人 // Subject = "测试邮件",//邮件标题 // Body = "你好啊",//邮件内容 //}.SendAsync(s => //{ // Console.WriteLine(s);// 发送成功后的回调 // });// 异步发送邮件 } }