文章分类 -  邮件发送

摘要:using System.Net.Mail;using System.Threading;//************************发送邮件代码: System.Net.Mail.SmtpClient client = new SmtpClient(); client.Host = "smtp.qq.com"; client.UseDefaultCredentials = false; client.Credentials = new System.Net.NetworkCredential("账号", "密码");... 阅读全文
posted @ 2014-02-19 13:34 Net-Spider 阅读(213) 评论(0) 推荐(0) 编辑
摘要:1.了解发送邮件的三种方式 2.实例介绍使用client.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.PickupDirectoryFromIis 3.如何设定本机IIS的SMTP服务器 1.了解发送邮件的三种方式 第一:client.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network; //通過遠程SMTP服務器傳送該郵件,這裡的network表示你要使用的远程SMTP服務器。 第二:client.DeliveryMethod = System.Net.Mail.S 阅读全文
posted @ 2013-06-05 23:46 Net-Spider 阅读(233) 评论(0) 推荐(0) 编辑
摘要:本来想试试用SmtpClient来做一个简单的发送邮件的Demo程序。却不想在中途遇上了意料之外的事情,使得这次试验过程变得有些曲折。程序是这样的:static void Main(string[] args){ SmtpClient client = new SmtpClient(); client.Host = "localhost"; MailAddress from = new MailAddress("from@test.com"); MailAddress to = new MailAddress("to@test.com" 阅读全文
posted @ 2013-03-08 11:16 Net-Spider 阅读(209) 评论(0) 推荐(0) 编辑
摘要:代码:usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Text;usingSystem.Windows.Forms;usingSystem.Net;usingSystem.Net.Mail;usingSystem.Net.Mime;usingSystem.IO;namespaceSendMailExample{publicpartialclassFormSendMail:Form{publicFormSe 阅读全文
posted @ 2012-12-30 14:30 Net-Spider 阅读(179) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示