没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
namespace AutoReplyMail
{
public partial class Form1 : Form
{
NetworkStream ns;
StreamReader sr;
SslStream sslStream;
static int count;
static int count2;
/// <summary>
/// 获取接收邮件服务器登陆信息,登陆
/// </summary>
public string server = string.Empty;//服务器
public string port = string.Empty;//端口
public string loginname = string.Empty;//登陆名
public string loginpassword = string.Empty;//登陆密码
public void main(){
ArrayList maillist = GetNewMail();
}
public ArrayList GetNewMail()
{
int mailnum = GetNewMailNum();//获取有邮件封数
ArrayList getnewmail = new ArrayList();//实例化主方法
try(){
Connect();//登录邮箱
string UIDL = MailID(i);//获取邮件唯一标识符
{
public partial class Form1 : Form
{
NetworkStream ns;
StreamReader sr;
SslStream sslStream;
static int count;
static int count2;
/// <summary>
/// 获取接收邮件服务器登陆信息,登陆
/// </summary>
public string server = string.Empty;//服务器
public string port = string.Empty;//端口
public string loginname = string.Empty;//登陆名
public string loginpassword = string.Empty;//登陆密码
public void main(){
ArrayList maillist = GetNewMail();
}
public ArrayList GetNewMail()
{
int mailnum = GetNewMailNum();//获取有邮件封数
ArrayList getnewmail = new ArrayList();//实例化主方法
try(){
Connect();//登录邮箱
string UIDL = MailID(i);//获取邮件唯一标识符
ArrayList getmaillist = GetReadMail(i); //获取邮件信息
MailMessage msg = new MailMessage();
msg.To.Add(GetMailTo(getmaillist));//收件人
msg.From = GetMailFrom(getmaillist);//发件人
List<string> listSubject = GetMailSubject(getmaillist);//标题列表处理
string title = ProcessSubject(listSubject, msg);//标题处理之后
string mailbody = GetMailBody(getmaillist);//正文
mailbody = ProcessBody(mailbody);//正文处理
msg.Body = DecodeBase64(mailbody).Trim();//正文编码处理
Disconnect();//断开服务器
return getnewmail;
}catch(Exception ex){
MessageBox.Show(ex.message);
}
}
/// <summary>
/// 登陆服务器
/// </summary>
private void Connect()
{
TcpClient sender = new TcpClient(server, 995);
Byte[] outbytes;
string input;
string readuser = string.Empty;
string readpwd = string.Empty;
try
{
MailMessage msg = new MailMessage();
msg.To.Add(GetMailTo(getmaillist));//收件人
msg.From = GetMailFrom(getmaillist);//发件人
List<string> listSubject = GetMailSubject(getmaillist);//标题列表处理
string title = ProcessSubject(listSubject, msg);//标题处理之后
string mailbody = GetMailBody(getmaillist);//正文
mailbody = ProcessBody(mailbody);//正文处理
msg.Body = DecodeBase64(mailbody).Trim();//正文编码处理
Disconnect();//断开服务器
return getnewmail;
}catch(Exception ex){
MessageBox.Show(ex.message);
}
}
/// <summary>
/// 登陆服务器
/// </summary>
private void Connect()
{
TcpClient sender = new TcpClient(server, 995);
Byte[] outbytes;
string input;
string readuser = string.Empty;
string readpwd = string.Empty;
try
{
剩余19页未读,继续阅读







Silvester
- 粉丝: 1
- 资源: 6

上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
已下载
下载帮助

资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制

- 1
- 2
前往页