username@email.com
2022-01-21 b18a7c8e54b51a5caa400e55cb8cc428c0301a0c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
 
namespace CY.Infrastructure.Mail
{
    #region 邮件收发代码接口
 
    public interface ISmtpMail
    {
        /// <summary>
        /// 端口
        /// </summary>
        int MailDomainPort { set; }
 
        /// <summary>
        /// 发件人地址
        /// </summary>
        string From { set; get; }
 
        /// <summary>
        /// 发件人姓名
        /// </summary>
        string FromName { set; get; }
 
        /// <summary>
        /// 是否支持Html
        /// </summary>
        bool Html { set; get; }
 
        /// <summary>
        /// 邮件标题
        /// </summary>
        string Subject { set; get; }
 
        /// <summary>
        /// 邮件内容
        /// </summary>
        string Body { set; get; }
 
        /// <summary>
        ///  邮件服务器地址
        /// </summary>
        string MailDomain { set; }
 
        /// <summary>
        /// 用户名
        /// </summary>
        string MailServerUserName { set; }
 
        /// <summary>
        /// 口令
        /// </summary>
        string MailServerPassWord { set; }
 
        /// <summary>
        /// 收件人姓名
        /// </summary>
        string RecipientName { set; get; }
 
        /// <summary>
        /// 收件人列表
        /// </summary>
        /// <param name="username"></param>
        /// <returns></returns>
        bool AddRecipient(params string[] username);
 
        /// <summary>
        /// 发送
        /// </summary>
        /// <returns></returns>
        bool Send();
 
    }
 
    #endregion
}