AppConfigEmailItem.cs 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. using Azylee.Core.AppUtils.AppConfigUtils.AppConfigInterfaces;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. namespace Azylee.Core.AppUtils.AppConfigUtils.AppConfigModels
  7. {
  8. /// <summary>
  9. /// Email邮箱配置信息
  10. /// </summary>
  11. public class AppConfigEmailItem : IAppConfigItemModel
  12. {
  13. /// <summary>
  14. /// 序号
  15. /// </summary>
  16. public int Number { get; set; }
  17. /// <summary>
  18. /// 邮箱地址
  19. /// </summary>
  20. public string MailAddress { get; set; }
  21. /// <summary>
  22. /// 用户名
  23. /// </summary>
  24. public string Username { get; set; }
  25. /// <summary>
  26. /// 邮箱密码
  27. /// </summary>
  28. public string Password { get; set; }
  29. /// <summary>
  30. /// 对邮件内容进行socket层加密传输,false表示不加密
  31. /// </summary>
  32. public bool SslEnable { get; set; }
  33. /// <summary>
  34. /// 对发件人邮箱进行密码验证,false表示不对发件人邮箱进行密码验证
  35. /// </summary>
  36. public bool PwdCheckEnable { get; set; }
  37. /// <summary>
  38. /// 发送邮件所用的端口号(htmp协议默认为25)
  39. /// </summary>
  40. public int Port { get; set; }
  41. /// <summary>
  42. /// 默认构造函数
  43. /// </summary>
  44. /// <param name="_number"></param>
  45. /// <param name="_mailAddress"></param>
  46. /// <param name="_username"></param>
  47. /// <param name="_password"></param>
  48. /// <param name="_sslEnable"></param>
  49. /// <param name="_pwdCheckEnable"></param>
  50. /// <param name="_port"></param>
  51. public AppConfigEmailItem(int _number, string _mailAddress, string _username, string _password, bool _sslEnable = false, bool _pwdCheckEnable = false, int _port = 25)
  52. {
  53. Number = _number;
  54. MailAddress = _mailAddress;
  55. Username = _username;
  56. Password = _password;
  57. SslEnable = _sslEnable;
  58. PwdCheckEnable = _pwdCheckEnable;
  59. Port = _port;
  60. }
  61. /// <summary>
  62. /// 排序序号
  63. /// </summary>
  64. /// <returns></returns>
  65. public int GetOrderNumber()
  66. {
  67. return this.Number;
  68. }
  69. /// <summary>
  70. /// 唯一名称
  71. /// </summary>
  72. /// <returns></returns>
  73. public string GetUniqueName()
  74. {
  75. return this.MailAddress;
  76. }
  77. }
  78. }