邮件可以用两种方式。第一,用Jmail组件实现。第二种,用using System.Net.Mail;我给出第二种的代码先定义类:protected bool Smail(MailAddress messageForm,string name,string pass,string toname,string server,string subject,string body,string ment)
{
MailMessage message = new MailMessage();
Attachment ments;
ments = new Attachment(ment);//...
|