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.

125 lines
3.6 KiB
C#

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DS.Module.EmailModule
{
/// <summary>
/// 大简云邮箱接口请求
/// </summary>
public class DjyEmailSendReq
{
/// <summary>
/// 接收邮箱
/// </summary>
public string SendTo { get; set; }
/// <summary>
/// 抄送
/// </summary>
public string CCTo { get; set; }
/// <summary>
/// 邮件标题
/// </summary>
public string Title { get; set; }
/// <summary>
/// 邮件正文
/// </summary>
public string Body { get; set; }
/// <summary>
/// 邮件显示的发送人 不设置则显示发送的邮箱
/// </summary>
public string ShowName { get; set; }
/// <summary>
/// 发送邮箱配置(发件邮箱)
/// </summary>
public string SmtpConfig { get; set; }
/// <summary>
/// 附件列表
/// </summary>
public List<Attaches> Attaches { get; set; }
/// <summary>
/// 自定义发送的邮箱账号 发件邮箱的账号,使用自定义邮箱发送邮件时,必须指定
/// </summary>
public string Account { get; set; }
/// <summary>
/// 自定义发送的邮箱密码 发件邮箱的密码,使用自定义邮箱发送邮件时,必须指定
/// </summary>
public string Password { get; set; }
/// <summary>
/// 自定义发送的邮箱服务器 发件邮箱的服务器地址,使用自定义邮箱发送邮件时,必须指定
/// </summary>
public string Server { get; set; }
/// <summary>
/// 自定义发送的发件端口 发件邮箱的端口,使用自定义邮箱发送邮件时,必须指定
/// </summary>
public int Port { get; set; }
/// <summary>
/// 自定义发送是否使用ssl 发件邮箱的是否使用SSL使用自定义邮箱发送邮件时必须指定
/// </summary>
public bool UseSSL { get; set; }
}
/// <summary>
/// 附件信息
/// </summary>
public class Attaches {
/// <summary>
/// 附件名称 在邮件中显示的附件名称
/// </summary>
public string AttachName { get; set; } = string.Empty;
/// <summary>
/// 附件内容 以base64编码的字符串
/// </summary>
public string AttachContent { get; set; } = string.Empty;
}
/// <summary>
/// SmtpConfig选项枚举
/// </summary>
public enum SmtpConfigEnum {
/// <summary>
/// dongshengcangdan@h8j.top
/// </summary>
CANGDAN,
/// <summary>
/// inv@mail.myshipping.net
/// </summary>
INVOICE,
/// <summary>
/// noreplay@mail.myshipping.net
/// </summary>
NOREPLAY,
/// <summary>
/// service@mail.myshipping.net
/// </summary>
SERVICE,
/// <summary>
/// spot@mail.myshipping.net
/// </summary>
SPOT,
}
/// <summary>
/// 大简云邮箱接口返回
/// </summary>
public class DjyEmailSendRes {
/// <summary>
/// 是否成功
/// </summary>
public bool Success { get; set; }
/// <summary>
/// 说明文本
/// </summary>
public string Message { get; set; }
/// <summary>
/// 代号
/// </summary>
public string Code { get; set; }
}
}