haha.asp
上传用户:kesong
上传日期:2020-12-12
资源大小:1k
文件大小:1k
- <%
- Const SMTPServerIP = "******"
- Dim strFrom, strTo,strSuject, strBody
- strFrom = request.form("aa")
- strTo = request.form("email")
- strSubject = request.form("subject")
- strBody = request.form("body")
-
- Dim sch, cdo, cdoConfig
- sch = "http://schemas.microsoft.com/cdo/configuration/"
- Set cdoConfig = Server.CreateObject("CDO.Configuration")
- cdoConfig.Fields.Item(sch & "sendusing") = 2
- cdoConfig.Fields.Item(sch & "smtpserver") = SMTPServerIP
- cdoConfig.Fields.Item(sch & "smtpauthenticate") = 1
- cdoConfig.Fields.Update
- Set cdo = Server.CreateObject("CDO.Message")
- Set cdo.Configuration = cdoConfig
- cdo.From = strFrom
- cdo.To = strTo
-
- cdo.subject = strSubject
- cdo.TextBody = strBody
-
- cdo.Send
- Set cdoConfig = Nothing
- Set cdo = Nothing
- response.write("ok")
- %>