You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.9 KiB
C#

12 months ago
using crypto;
12 months ago
using Essensoft.Paylink.Alipay.Domain;
12 months ago
using LanguageExt.Pipes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
12 months ago
using static SKIT.FlurlHttpClient.Wechat.Api.Models.WxaBusinessPerformanceBootResponse.Types.Data.Types;
12 months ago
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<string>("EmailOptions:Host"),
12 months ago
// Port = Configuration.GetValue<int>("EmailOptions:Port"), 改非25端口
12 months ago
// SenderName = Configuration.GetValue<string>("EmailOptions:SenderName"),
// SenderEmail = Configuration.GetValue<string>("EmailOptions:FromAddress"),
// // can be optional with no authentication
// Account = Configuration.GetValue<string>("EmailOptions:UserName"),
// Password = Configuration.GetValue<string>("EmailOptions:Password"),
// // enable ssl or tls
// Security = true
//});
12 months ago
// 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);// 发送成功后的回调
// });// 异步发送邮件
12 months ago
}
}