<iframe name="google_ads_frame" marginwidth="0" marginheight="0" src="http://pagead2.googlesyndication.com/pagead/ads?client=ca-pub-4490194096475053&dt=1226676421500&lmt=1226285453&prev_slotnames=1891601125&output=html&slotname=3685991503&correlator=1226676421453&url=http%3A%2F%2Fwww.corange.cn%2Farchives%2F2008%2F08%2F1504.html&ea=0&ref=http%3A%2F%2Fwww.corange.cn%2Fhtml%2Fcorange__86.html&frm=0&ga_vid=451322836.1226643509&ga_sid=1226675611&ga_hid=1978032466&ga_fc=true&flash=9.0.124.0&u_h=768&u_w=1024&u_ah=715&u_aw=1024&u_cd=32&u_tz=480&u_java=true&dtd=15" frameborder="0" width="300" scrolling="no" height="250" allowtransparency></iframe>
主要的代码如下: using System.Web.Mail;
字串9
字串6
MailMessage myMail = new MailMessage();
字串4
myMail.To = "ast03@mails.tsinghua.edu.cn"; //接受方的电子邮件地址
字串2
myMail.From = "youyouyou@mails.tsinghua.edu.cn"; //发送方的电子邮件地址
字串9
字串3
myMail.BodyFormat = MailFormat.Text; // 邮件的正文编码方式,可以选text或者html
[/color]
字串4
myMail.Priority = MailPriority.Normal; //邮件的优先级
字串4
myMail.Subject = "hello.testing!!!"; //邮件的标题
[color=#ffffff]字串1
myMail.Body = "just for fun ,never mind!!!!"; //邮件的正文内容 字串4
SmtpMail.Send(myMail);
字串6
需要引用system.web.mail里的类来实现.其中MailMessage这个是电子邮件的主要类. 最后,利用SmtpMail这个类里的send方法来发送邮件.(请启动smtp服务)