求教如何使客户的求够信息发到网站上然后自动发到企业邮箱里啊? http://community.csdn.net/Expert/topic/3815/3815213.xml?temp=.3788111

解决方案 »

  1.   

    to  simon8181()  大哥能不能讲具体点,具体怎么转发啊?
      

  2.   

    在你的数据库里写触发器当你插入记录时调用xp_cmdShell。
      

  3.   

    to zhanqiangz(闲云野鹤) 大哥xp_cmdShell是什么,具体怎么用啊?
      

  4.   

    得到用户订购信息的同时引发事件,而处理事件的方法则调用JMail组件把这个信息发出去就OK了。不知道有什么好说的啊
      

  5.   

    1.jamil如:
    把jmail引用到工程中,加入jmail的命名空间,在这里我将引用jmail包的MessageClass类。
    Logging属性:是否使用日志
    Silent属性:如果设置为true,JMail不会抛出例外错误. JMail. Send( () 会根据操作结果返回true或false
    MailServerUserName属性:发信人的用户名,如:[email protected];
    MailServerPassWord属性:发信人的密码
    From属性:发信人
    Subject属性:主题
    AddAttachment()方法:附加文件
    Body属性:邮件正文。
    下面是一个完整的例子:
    public bool sendMail(){MessageClass email = new MessageClass();email.Logging = true;email.Silent = true;email.MailServerUserName = "[email protected]";email.MailServerPassWord = "124";email.From = "[email protected]";
    email.Subject = "jmail";email.AddAttachment("c:\\test.xml",true,"");
    email.Body = "test jmail send mail";
    email.AddRecipient("[email protected]", "abc", null);return email.Send("mail.163.com", false) }
    第二种cdonts如:
    using System.Web.Mail;  //引入名称空间MailMessage ms=new MailMessage();//建立邮件对象
      ms.To=email;  //string email是对方邮箱地址
      ms.From="自己的邮箱地址";  //可以是任意可用smtp地址
      ms.Subject="title"; //邮件标题
    //----------------------正文--------------------------
        ms.Body ="姓名:     "+txtname.Text+"\r\n";
        ms.Body+="性别:     "+txtsex.Text+"    年龄:"+txtage.Text+"\r\n";
        ms.Body+="出生地:   "+txtaddress.Text+"\r\n";
        ms.Body+="出生日期: "+txtbirthday.Text+"\r\n";
    //----------------------正文结束------------------------
      ms.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1");
    //是否需要验证,一般是要的
    ms.Fields.Add 
    ("http://schemas.microsoft.com/cdo/configuration/sendusername", "用户名"); 
    //自己邮箱的用户名
    ms.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "密码");
    //自己邮箱的密码 SmtpMail.SmtpServer="smtp.chuguo.org.cn"; //自己邮箱的邮件服务器地址
    SmtpMail.Send(ms); //发送
    //注:运行该程序时不要开启瑞星的邮件发送监控,否则cpu使用率100%,在vs2003,win2003 下测试通过
      

  6.   

    to yb2008(努力学ASP.NET!!) 大哥呵呵,谢谢谢谢,俺先试试看!!