Answers
Jmail组件,功能丰富,并且不需要诸如Outlook之类的邮件客户端.使用时添加Jmail组件的引用就行.
C# code
using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; //引用 using System.Net; using System.Net.Mail; using System.Net.Mime; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void btnSend_Click(object sender, EventArgs e) { string file = Server.MapPath("testXML.xml"); MailMessage myMail = new System.Net.Mail.MailMessage(); ; myMail = new System.Net.Mail.MailMessage(txtSender.Text.Trim(), txtReceiver.Text.Trim(),txtSubject.Text.Trim(),txtContent.Text.Trim()); if (ddlAccessories.Items.Count > 0) { for (int i m