using Learun.Application.OA.Email.EmailSend;
using Learun.Util;
using System;
using System.Collections.Generic;
namespace Learun.Application.OA.Email
{
///
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2017
/// 创建人:陈彬彬
/// 日 期:2018.06.04
/// 描 述:邮件管理
///
public class EmailBLL:EmailIBLL
{
private EmailService emailService = new EmailService();
private EmailSendService emailSendService = new EmailSendService();
#region 获取数据
///
/// 获取邮件
///
/// 主键
///
public List GetMail(MailAccount account, int receiveCount)
{
try
{
return MailHelper.Get(account,receiveCount);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 发送邮件
///
/// 邮箱账户
/// 邮箱类
///
public void SendMail(MailAccount account, MailModel mailModel)
{
try
{
MailHelper.Send(account, mailModel);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
///
/// 删除邮件
///
/// 邮箱账户
/// UID
///
public void DeleteMail(MailAccount account, string UID)
{
try
{
MailHelper.Delete(account, UID);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion
#region 提交数据
#endregion
}
}