DeviceManager/TsSFCDeivceClient/Email/EmailSendParams.cs
2024-05-29 09:56:37 +08:00

95 lines
3.0 KiB
C#
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*---------------------------------------------------------------------
* 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 TsSFCDeivceClient.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
}
}