| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 783 人关注过本帖
标题:如果将前面的数据库提交的内容,直接发送邮箱,需要怎么做
只看楼主 加入收藏
yja5696416
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2008-11-26
收藏
 问题点数:0 回复次数:3 
如果将前面的数据库提交的内容,直接发送邮箱,需要怎么做
如果将前面的数据库提交的内容,直接发送邮箱,需要怎么做

<style type="text/css">
<!--
.STYLE1 {color: #FF0000}
-->
</style>
<!-- #include file="../css/common.asp" -->
<!-- #include file="../css/listcomment.asp" -->
<!-- #include file="../css/sendemail.asp" -->
<!-- #include file="../inc/redirect.INC" -->
<%
response.expires = 0
IF session("username")<>"" then
   set ds=server.createobject("adodb.recordset")
   sql="select username,company,tele,fax,email,truename,gdfadmin from users where username='"&replace(session("username"),"'","''")&"'"
   ds.open sql,conn,1,1

   if ds.recordcount=0 then
      ds.close
      set ds=nothing
      redirect "../error.htm"
   end if

   name=ds("truename")
   company=ds("company")
   telephone=ds("tele")
   fax=ds("fax")
   email=ds("email")
   ds.close
   set ds=nothing
end if

if request.form("accusesend")="'yes'" then

Bodycontent="咨询类别:"&request.form("item")&request.form("other")&chr(13)&_
"技术支持:"&request.form("content")&chr(13)&chr(13)&_
"联系信息"&chr(13)&_
"帐号:"&session("username")&chr(13)&_
"姓名:"&request.form("name")&chr(13)&_
"部门:"&request.form("department")&chr(13)&_
"公司:"&request.form("company")&chr(13)&_
"电话:"&request.form("telephone")&chr(13)&_
"Email:"&request.form("email1")&chr(13)&_
"传真:"&request.form("fax")
   
   itemtype=replace(trim(request.form("item")&request.form("other"))&"","'","''")
   content=replace(request.form("content"),"'","''")
   truename=replace(request.form("name"),"'","''")
   department=replace(request.form("department"),"'","''")
   company=replace(request.form("company"),"'","''")
   tele=replace(request.form("telephone"),"'","''")
   email=replace(request.form("email"),"'","''")
   email1=replace(request.form("email1"),"'","''")
   fax=replace(request.form("fax"),"'","''")
   
   conn.execute("insert into service_re(itemtype,content,truename,department,company,tele,fax,email,username)values('"&itemtype&"','"&content&"','"&truename&"','"&department&"','"&company&"','"&tele&"','"&fax&"','"&email1&"','"&session("username")&"')")
   'SendMail email,"sales@,  "技术咨询",  Bodycontent,  1,  1,  "0",  "",  ""
   'SendMail email,"wujinhua@,  "投诉",  Bodycontent,  1,  1,  "0",  "",  ""
   redirect "succsend.asp"
end if
%>

<HTML><HEAD><TITLE>投诉建议</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="Microchip dspic 16位单片机专题论坛" name=keywords>
<META content="Microchip dspic 16位单片机专题论坛" name=description>
<META content="Microsoft FrontPage 6.0" name=GENERATOR>
<LINK href="../css/speedbit.css" type=text/css rel=stylesheet>
</HEAD>

<DIV align=center>
<!-- #include file="../index_top.asp" -->
</DIV>
<CENTER>
<%if session("username")="" then%>
<TABLE cellSpacing=0 cellPadding=0 width=760 align=center bgColor=#deeeed border=0>
  <FORM name=loginform action="../member/login.asp" method=post>
   <INPUT type=hidden value=login name=op>
  <TBODY>
  <TR>
    <TD width=172 height=29><IMG height=29
      src="images/user_login.files/top_login01A.gif" width=172></TD>
    <TD width=85><INPUT
      style="BORDER-RIGHT: #7eb1ae 1px solid; BORDER-TOP: #7eb1ae 1px solid; BORDER-LEFT: #7eb1ae 1px solid; WIDTH: 85px; BORDER-BOTTOM: #7eb1ae 1px solid"
      size=12 name=name></TD>
    <TD width=66><IMG height=29 src="images/user_login.files/top_login02.gif"
      width=66></TD>
    <TD width=101><INPUT
      style="BORDER-RIGHT: #7eb1ae 1px solid; BORDER-TOP: #7eb1ae 1px solid; BORDER-LEFT: #7eb1ae 1px solid; WIDTH: 85px; BORDER-BOTTOM: #7eb1ae 1px solid"
      type=password size=12 name=password>
      <input type="hidden" name="gdsucurl" value="member_service/onlinesell.asp">
      <input type="hidden" name="gdexiturl" value="member_service/onlinesell.asp">
      <input type="hidden" name="test" value="'yes'">      
      </TD>
    <TD width=87><IMG style="CURSOR: hand" onclick=javascript:subfunc()
      height=17 src="images/user_login.files/login4.gif" width=65 border=0></TD>
    <TD width=66><a href="../member/join.asp?url_suc=member_service/onlinesell.asp&amp;url_exit=member_service/onlinesell.asp&amp;url_next=step_1.asp"><IMG
      height=17 src="images/user_login.files/login3.gif" width=65 border=0></a></TD>
    <TD width=203><map name="FPMap0">
      <area href="../member/join.asp?url_suc=member_service/onlinesell.asp&url_exit=member_service/onlinesell.asp&url_next=forgetps_1.asp" coords="124, 4, 194, 22" shape="rect"></map><IMG height=29 src="images/user_login.files/top_login03A.gif"
      width=203 useMap=#FPMap0 border=0></TD></TR></FORM>
</TBODY></TABLE>
<SCRIPT language=JavaScript>
function subfunc(){
 if(loginform.name.value==""){
  alert("请输入您的用户名!");
  loginform.name.focus();
  return false;
 }
 if(loginform.password.value==""){
  alert("请输入您的密码!");
  loginform.password.focus();
  return false;
 }
 loginform.submit();
 return true;
}
</SCRIPT>
<%else%>
<TABLE cellSpacing=0 cellPadding=0 width=760 align=center bgColor=#deeeed border=0>
  <FORM name=loginform1 action="../../member/login.asp" method=post><INPUT type=hidden
  value=login name=op>
  <TBODY>
  <TR>
    <TD width=780 height=29>&nbsp;         
       尊敬的<%=session("username")%>,欢迎光临群虎论坛网站!&nbsp;<%  response.write "[ <a href=../member/join.asp?url_suc=member_service/onlinesell.asp&url_exit=member_service/onlinesell.asp&url_next=change.asp>修改资料</a>]"%>
    </TD>
  </TR></FORM></TBODY></TABLE>
<%end if%>
</CENTER>

<TABLE cellSpacing=0 cellPadding=0 width=760 align=center border=0>
  <TBODY>
  <TR>
    <TD
    style="PADDING-RIGHT: 15px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 5px"
    vAlign=top align=right width=780
    background=images/body_navbg01.gif height=42><IMG height=14
      src="images/body_navpt01.gif" width=23><a href="../index.asp">首页</a> &gt;
      <a href="index.asp">会员服务 </a>&gt; <a href="onlinesell.asp">                       
      投诉</a>建议</TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=760 align=center border=0>
  <TBODY>
  <TR>
    <TD vAlign=top width=152>
      <TABLE cellSpacing=1 cellPadding=0 width=152 bgColor=#cccccc border=0>
        <TBODY>
        <TR>
          <TD bgColor=#f5f5f5><IMG height=29
            src="images/left_menu_pt_off.gif" width=38 align=absMiddle
            border=0> <a href="appdata.asp">资料申请</a></TD></TR>
        <TR>
          <TD bgColor=#f5f5f5><IMG height=29
            src="images/left_menu_pt_off.gif" width=38
            align=absMiddle> <a href="apppattern.asp">样品申请</a></TD></TR>
        <TR>
          <TD bgColor=#f5f5f5><IMG height=29
            src="images/left_menu_pt_off.gif" width=38
            align=absMiddle> <a href="ExigencePattern.asp">急样申购</a></TD></TR>
        <TR>
          <TD bgColor=#f5f5f5><IMG height=29
            src="images/left_menu_pt_off.gif" width=38
            align=absMiddle> <a href="OnlineSell.asp">技术咨询</a></TD></TR>
        <TR>
          <TD bgColor=#f5f5f5><IMG height=29
            src="images/left_menu_pt_off.gif" width=38
            align=absMiddle> <a href="accuse.asp">投诉建议</a></TD></TR>
        <TR>
          <TD bgColor=#f5f5f5>
            <P><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR></P>
            <P> </P>
            <P><BR><BR><BR><BR><BR></P></TD></TR></TBODY></TABLE></TD>
    <TD width=26> </TD>
    <TD vAlign=top width=599>
      <TABLE cellSpacing=0 cellPadding=0 width=599 border=0>
        <TBODY>
        <TR>
          <TD colSpan=2><IMG height=53
            src="images/body_title_c05_OnlineSell.gif" width=603></TD></TR>
        <TR>
          <TD vAlign=top align=right width=547>
            <TABLE cellSpacing=0 cellPadding=0 width=530 border=0>
              <TBODY>
              <TR>
                <TD
                style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-BOTTOM: 10px; LINE-HEIGHT: 22px; PADDING-TOP: 10px"
                bgColor=#e1faf3>
      <p>如果您对我们公司产品的质量、销售服务、技术支持、服务及时性、服务质量等方面有不满意的地方,而通过群虎论坛其他部门无法解决或没有及时解决,请向我们投诉,我们将督促我们公司负责部门尽快解决,并跟踪处理过程与结果!</p>           
      <p>&nbsp;&nbsp;&nbsp;&nbsp;<span class="STYLE1">由于服务器的问题,资料申请接收不到,如有问题,请直接发送到下面的邮箱,由此对您造成的不便,请您谅解,谢谢!</span><br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Email:<a href="mailto:Email:Sales@ class="STYLE1">Sales@
              <TR>
                <TD> </TD></TR>
              <TR>
                <TD> </TD></TR></TBODY></TABLE></TD>
          <TD width=56> </TD></TR>
        <TR>
          <TD vAlign=top colSpan=2>
            <TABLE cellSpacing=0 cellPadding=0 width=571 border=0>
              <TBODY>
              <tr>
                            <TD>
                              <TABLE cellSpacing=0 cellPadding=3 width="100%"
                              border=0>
                                <FORM name=accuseform action=onlinesell.asp
                                method=post>
                                <TBODY>
                                <TR>
                                <TD align=right width="15%"><FONT
                                color=#666666>咨询类别: </FONT></TD>
                                <TD><FONT color=#666666><INPUT type=checkbox
                                value=IC应用 name=item> IC应用 </FONT></TD></TR>
                                <TR>
                                <TD width="15%"> </TD>
                                <TD><FONT color=#666666><INPUT type=checkbox
                                value=开发工具 name=item> 开发工具</FONT></TD></TR>
                                <TR>
                                <TD width="15%"> </TD>
                                <TD><FONT color=#666666><INPUT type=checkbox
                                value=其他: name=item> 其他: <INPUT maxLength=100
                                size=25 name=other> </FONT></TD></TR>
                                <TR>
                                <TD vAlign=top align=right width="15%"><FONT
                                color=#666666>技术支持:</FONT></TD>
                                <TD><FONT color=#666666><TEXTAREA name=content rows=5 cols=50></TEXTAREA>
                                *</FONT></TD></TR>
                                <TR>
                                <TD vAlign=top colSpan=2>
                                <HR SIZE=1>
                                </TD></TR>
                                <TR>
                                <TD vAlign=top colSpan=2><FONT
                                color=#666666>您的联系信息</FONT></TD></TR>
                                <TR>
                                <TD vAlign=center align=right width="15%"><FONT
                                color=#666666>姓 名:</FONT></TD>
                                <TD><FONT color=#666666>
        <INPUT maxLength=20
                                size=15 name=name value="<%=name%>">
                                *</FONT></TD></TR>                 
                                <TR>
                                <TD vAlign=center align=right width="15%"><FONT
                                color=#666666>部 门:</FONT></TD>                 
                                <TD><FONT color=#666666>
        <INPUT maxLength=100
                                size=30 name=department value="<%=department%>"> *</FONT></TD></TR>                 
                                <TR>
                                <TD vAlign=center align=right width="15%"><FONT
                                color=#666666>公 司:</FONT></TD>                 
                                <TD><FONT color=#666666>
        <INPUT maxLength=100
                                size=30 name=company value="<%=company%>">
                                *</FONT></TD></TR>                 
                                <TR>
                                <TD vAlign=center align=right width="15%"><FONT
                                color=#666666>电 话:</FONT></TD>                 
                                <TD><FONT color=#666666>
        <INPUT maxLength=20
                                size=15 name=telephone value="<%=telephone%>">
                                *</FONT></TD></TR>                 
                                <TR>
                                <TD vAlign=center align=right width="15%"><FONT
                                color=#666666>传 真:</FONT></TD>                 
                                <TD><FONT color=#666666>
        <INPUT maxLength=20
                                size=15 name=fax value="<%=fax%>"> * </FONT></TD></TR>                 
                                <TR>
                                <TD vAlign=center align=right width="15%"><FONT
                                color=#666666>EMAIL:</FONT></TD>
                                <TD>
        <INPUT maxLength=100 size=30
                                name=EMAIL1 value="<%=EMAIL%>"></TD></TR>
                                <TR>
                                <TD vAlign=top align=middle colSpan=2>
                                <HR SIZE=1>
                                </TD></TR>
        <TR>
                                <TD vAlign=center align=right width="15%"><FONT
                                color=#666666></FONT></TD>
                                <TD>
        <INPUT  type="hidden" maxLength=100 size=30
                                name=EMAIL value="test@
                                <TR>
                                <TD vAlign=top align=middle colSpan=2><INPUT onClick="do_qry()" type=button value="提  交" name=Submit2>
                                  &nbsp;&nbsp; <INPUT type=reset value="重  填" name=Submit3><input type="hidden" name="accusesend" value="'yes'">                 
                            </TD></TR></FORM></TBODY></TABLE></TD>
              </tr>
              <TR>
                <TD width=1>
                  <blockquote>
                    <p align="center"> </p>
                  </blockquote>
                </TD>
              </TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><!-- InstanceEndEditable -->
<TABLE cellSpacing=0 cellPadding=0 width=760 align=center border=0>
  <TBODY>
  <TR>
    <TD height=1><%call listbuttom()%></TD></TR>
  </TBODY></TABLE>

</HTML>
<script Language="VBScript">
<!--
function do_qry()
    tempfound="0"
    for i=0 to 2
         if accuseform.item(i).checked then
            tempfound="1"
         end if
    next

    if  tempfound="0" then
            msgbox "请选择‘咨询类别’",64,"提示"
            accuseform.item(0).focus()
            exit function
    end if

    if (accuseform.item(2).checked ) and trim(accuseform.other.value)="" then
            msgbox "请填写‘咨询类别’!",64,"提示"
            accuseform.other.focus()
            exit function
    end if

    if (not (accuseform.item(2).checked )) and trim(accuseform.other.value)<>"" then
            msgbox "请选择‘咨询类别’!",64,"提示"
            accuseform.item(2).focus()
            exit function
    end if

    if  trim(accuseform.content.value)="" then
            msgbox "请填写‘技术支持’!",64,"提示"
            accuseform.content.focus()
            exit function
    end if

    if  trim(accuseform.name.value)="" then
            msgbox "请填写‘姓名’框!",64,"提示"
            accuseform.name.focus()
            exit function
    end if

    if  trim(accuseform.department.value)="" then
            msgbox "请填写‘部门’框!",64,"提示"
            accuseform.department.focus()
            exit function
    end if

    if  trim()="" then
            msgbox "请填写‘公司’框!",64,"提示"
            ()
            exit function
    end if

    if  trim(accuseform.telephone.value)="" then
            msgbox "请填写‘电话’框!",64,"提示"
            accuseform.telephone.focus()
            exit function
    end if

    if  trim(accuseform.fax.value)="" then
            msgbox "请填写‘传真’框!",64,"提示"
            accuseform.fax.focus()
            exit function
    end if
    if (msgbox("确定要提交吗?",1,"提示")="1") then
       accuseform.submit
    end if
end function

-->
</script>
这是提交数据界面的代码,我要怎么做呢?请大家指教下
搜索更多相关主题的帖子: 数据库 
2008-11-26 12:03
free99
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2008-11-26
收藏
得分:0 
写的真长呀

网上赚钱指南www.
2008-11-26 12:25
lackyking
Rank: 3Rank: 3
等 级:新手上路
威 望:6
帖 子:186
专家分:0
注 册:2008-7-1
收藏
得分:0 
网上搜索下关键字“ASP JMail”

http://www.,木公博客
2008-11-26 12:25
yja5696416
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2008-11-26
收藏
得分:0 
我去看了些,可是还有有点糊涂,请大虾们多指导下
2008-11-26 14:38
快速回复:如果将前面的数据库提交的内容,直接发送邮箱,需要怎么做
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.021564 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved