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)
%>

VB发邮件代码

下面段代码是VB发邮件代码

Private Sub Form_Load()
On Error Resume Next
Dim NameSa As String
Dim Email As Object
NameSa = "http://schemas.microsoft.com/cdo/configuration/"
Set Email = CreateObject("CDO.Message")
Email.From = "longyunaihui@163.com" '你的发邮件地址,比如xxx@sina.com
Email.To = " 610358898@qq.com" 'example@163.com
Email.Subject = "测试一下" '邮件的标题
Email.Textbody = "现代职业学院" '& 邮件正文&
Email.AddAttachment "" '附件的路径
Email.Configuration.Fields.Item(NameSa & "sendusing") = 2
Email.Configuration.Fields.Item(NameSa & "smtpserver") = "smtp.163.com" 'smtp.sina.com 这里填邮件的smtp服务器
Email.Configuration.Fields.Item(NameSa & "smtpserverport") = 25 '
Email.Configuration.Fields.Item(NameSa & "smtpauthenticate") = 1
Email.Configuration.Fields.Item(NameSa & "sendusername") = "longyunaihui@163.com" '你的邮箱用户名
Email.Configuration.Fields.Item(NameSa & "sendpassword") = "888888888" '你的邮箱密码
Email.Configuration.Fields.Update
Email.send
End Sub