DeviceManager/TsSFCDevice.Client.Launch/Common/Email/EmailSendParams.cs

95 lines
3.0 KiB
C#
Raw Permalink Normal View History

2024-08-02 02:52:45 +00:00
/*---------------------------------------------------------------------
* Copyright (C) 2024 TECHSCAN
* www.techscan.cn
*
*  
*                
*
*
* EmailSendParams.cs
* N/A
* 26950
* CLR版本 4.0.30319.42000
* 2024/5/24 12:56:01
* Client MAYONGLONG
* V1.0.0
==============================================================
* Ver
* V1.0.0 2024/5/24 12:56:01 Myl Create
*
======================================================================
//--------------------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TsSFCDevice.Client.Launch.Common.Email
{
public class EmailSendParams
{
/// <summary>
/// Smtp 服务器地址
/// </summary>
public string SmtpAddress { get; set; }
public bool IsSSL { get; set; }
public int SmtpPort { get; set; }
/// <summary>
/// 发件邮箱地址
/// </summary>
public string FromMailAddress { get; set; }
public bool EmailNoPass { get; set; }
public string Password { get; set; }
private static EmailSendParams m_DefaultParams;
public static EmailSendParams DefaultParams
{
get
{
if (m_DefaultParams == null)
{
m_DefaultParams = BuildDefaultParams();
}
return m_DefaultParams;
}
private set
{
m_DefaultParams = value;
}
}
#region Methods
private static EmailSendParams BuildDefaultParams(bool bMedtronic = true)
{
return bMedtronic ?
new EmailSendParams()
{
SmtpPort = 25,
IsSSL = false,
Password = string.Empty,
EmailNoPass = true,
SmtpAddress = "mail.medtronic.com",
FromMailAddress = "rs.czopssfc@medtronic.com"
}
:
new EmailSendParams()
{
SmtpPort = 465,
IsSSL = true,
Password = "RZo6kDcGllMmW6Q2",
EmailNoPass = false,
SmtpAddress = "smtp.qiye.aliyun.com",
FromMailAddress = "myl@techscan.cn"
};
}
#endregion
}
}