hotmail收邮件-源码联系我~
业余之作
源码很简单 ,实现了收邮件,读邮件,删邮件
static void Main()
{
HotMailPop3 pop3 = new HotMailPop3();
pop3.decoder = Encoding.Default.GetDecoder();
if (pop3.LoginMailServer())
{
pop3.StreamGetMailList();
string a = Console.ReadLine();
Console.WriteLine("邮件" + a + "的内容!");
StreamWriter sm_2 = new StreamWriter("2.txt");
sm_2.WriteLine(pop3.StreamGetMailIndex(int.Parse(a)));
sm_2.Close();
}
if (pop3.LoginMailServer())
{
// pop3.StreamDelMailIndex(2);
}
StreamWriter sm = new StreamWriter("1.txt");
foreach (var item in pop3.GetMailList)
{
sm.WriteLine("分割线________________________________");
sm.WriteLine(item.Value);
}
sm.Close();
pop3.OutMailServer();
}
【推荐】还在用 ECharts 开发大屏?试试这款永久免费的开源 BI 工具!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步