Backup/邮件/SmtpServerHelper.cs
(开头部分) 30KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Text;
using System.IO;
using System.Net.Sockets;
using System.Collections;
namespace DotNet.Utilities_Xofly
{
public enum MailFormat { Text, HTML };
public enum MailPriority { Low = 1, Normal = 3, High = 5 };
/// <summary>
/// 添加附件
/// </summary>
public class MailAttachments
{
#region 构造函数
public MailAttachments()
{
_Attachments = new ArrayList();
}
#endregion
#region 私有字段
private IList _Attachments;
private const int MaxAttachmentNum = 10;
#endregion
#region 索引器
public string this[int index]
{
get { return (string)_Attachments[index]; }
}
#endregion
#region 公共方法
/// <summary>
/// 添加邮件附件
/// </summary>
/// <param name="FilePath">附件的绝对路径</param>
public void Add(params string[] filePath)
{
if (filePath == null)
{
throw (new ArgumentNullException("非法的附件"));
}
else
{
for (int i = 0; i < filePath.Length; i++)
{
Add(filePath[i]);
}
}
}
/// <summary>
/// 添加一个附件,当指定的附件不存在时,忽略该附件,不产生异常。
/// </summary>
/// <param name="filePath">附件的绝对路径</param>
public void Add(string filePath)
后面还有 866 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
