asp传参发邮件

呵呵,公司需要网站提交表单后发到邮箱里,ASP不是做不到,但是需要组件支持,于此同事用.NET给我写了一个接口,直接调用传参就可以发送了,下面分享一下代码。
其中str1到str0都是表单里面的文本框,静态页和表单的代码就不一一列出了。

<meta http-equiv = "Content-Type" content = "text/html; charset = utf-8" />
<%
dim conststr1,conststr2,conststr3,conststr4,conststr5,conststr6,conststr7,conststr8,conststr9,conststr0,url,strP
dim requeststr1,requeststr2,requeststr3,requeststr4,requeststr5,requeststr6,requeststr7,requeststr8,requeststr9,requeststr0
dim strcount
dim temp1,temp2,temp3,temp4,temp5,temp6,temp7,temp8,temp9,temp0
strP = "<p>"
temp1 = request.form("str1")
temp2 = request.form("str2")
temp3 = request.form("str3")
temp4 = request.form("str4")
temp5 = request.form("str5")
temp6 = request.form("str6")
temp7 = request.form("str7")
temp8 = request.form("str8")
temp9 = request.form("str9")
temp0 = request.form("str0")

conststr1 = "公司名称: "
requeststr1 = conststr1 & temp1 & strP
conststr2 = "项目名称: "
requeststr2 = conststr2 & temp2 & strP
conststr3 = "项目预算: "
requeststr3 = conststr3 & temp3 & strP
conststr4 = "联系人: "
requeststr4 = conststr4 & temp4 & strP
conststr5 = "E-Mail: "
requeststr5 = conststr5 & temp5 & strP
conststr6 = "手机: "
requeststr6 = conststr6 & temp6 & strP
conststr7 = "电话: "
requeststr7 = conststr7 & temp7 & strP
conststr8 = "QQ: "
requeststr8 = conststr8 & temp8 & strP
conststr9 = "地址: "
requeststr9 = conststr9 & temp9 & strP
conststr0 = "需求描述: "
requeststr0 = conststr0 & temp0 & strP
strcount = requeststr1 & requeststr2 & requeststr3 & requeststr4 & requeststr5 & requeststr6 & requeststr7 & requeststr8 & requeststr9 & requeststr0

response.write strcount

url = "http://www.tuanb2b.com/openInterface/SendMail.aspx?action=sendMail&sendMail=454690484@qq.com&sendContent="& strcount &"&returnUrl=http://www.0535code.com"
Response.Redirect(url)
%>

发表评论

电子邮件地址不会被公开。 必填项已用*标注