易截截图软件、单文件、免安装、纯绿色、仅160KB

用ASP发送邮件


'creat by qqlxinye@tom.com
'time 2008-09-19
'qq:273453129
'web www.qqlxinye.cn
dim outSmtp,outUser,outPsd,recUser,recSubmit,bodyContent,AddAttachment,ifsend
function init_mail(str1,str2,str3,str4,str5,str6,str7)
  outSmtp=str1
  outUser=str2
  outPsd=str3
  recUser=str4
  recSubmit=str5
  bodyContent=str6
  AddAttachment=str7
  if isnull(outSmtp)or isnull(outUser)or isnull(outPsd) or isnull(recUser) or isnull(recSubmit) or isnull(bodyContent)  then
   ifsend=false
  end if
end function
function send()
  if not ifsend then
   Const cdoSendUsingMethod="http://schemas.microsoft.com/cdo/configuration/sendusing"
  Const cdoSendUsingPort=2
  Const cdoSMTPServer="http://schemas.microsoft.com/cdo/configuration/smtpserver"
  Const cdoSMTPServerPort="http://schemas.microsoft.com/cdo/configuration/smtpserverport"
  Const cdoSMTPConnectionTimeout="http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout"
  Const cdoSMTPAuthenticate="http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"
  Const cdoBasic=1
  Const cdoSendUserName="http://schemas.microsoft.com/cdo/configuration/sendusername"
  Const cdoSendPassword="http://schemas.microsoft.com/cdo/configuration/sendpassword"
 
  Dim objConfig ' As CDO.Configuration
  Dim objMessage ' As CDO.Message
  Dim Fields ' As ADODB.Fields
 
  Set objConfig = Server.CreateObject("CDO.Configuration")
  Set Fields = objConfig.Fields
 
  With Fields
  .Item(cdoSendUsingMethod) = cdoSendUsingPort
  .Item(cdoSMTPServer) =outSmtp
  .Item(cdoSMTPServerPort) = 25
  .Item(cdoSMTPConnectionTimeout) = 10
  .Item(cdoSMTPAuthenticate) = cdoBasic
  .Item(cdoSendUserName) = outUser
  .Item(cdoSendPassword) = outPsd
  .Update
  End With
 
  Set objMe


相关文档:

asp多文件上传(转)

<html xmlns="http://www.w3.org/1999/xhtml" > 
  <HEAD> 
    <title>多文件上传 </title> 
    <script language="JavaScript"> 
    function addFile() 
    { 
    var str = ' <br / ......

ASP 编程中 20 个非常有用的例子

1.如何用Asp判断你的网站的虚拟物理路径
答:使用Mappath方法
< p align="center" >< font size="4" face="Arial" >< b >
The Physical path to this virtual website is:
< /b >< /font >
< font color="#FF0000" size="6" face="Arial" >
< %= Server.MapPath("\")% >
......

asp连接Mssql的方法及常见的错误

asp衔接Mssql的办法及常见的差错
//第一种写法:
MM_conn_STRING = "Driver={SQL Server};server=(local);uid=sa;pwd=;database=infs;"
Set conn = Server.Createobject("ADODB.Connection")
conn.open MM_conn_STRING
SET RS=SERVER.CreateObject("ADOBD.recordset")
SQL="SELECT * from TABLE ORDER BY ID DESC"
R ......

ASP 内建对象

 
Active Server Pages 提供内建对象,这些对象使用户更容易收集通过浏览器请求发送的信息、响应浏览器以及存储用户信息(如用户首选项)。本文简要说明每一个对象。
Application 对象
可以使用 Application 对象使给定应用程序的所有用户共享信息。
Request 对象
可以使用 Request 对象访问任何用 HTTP 请求 ......

asp探针

<%@ Language="VBScript" %>
<%' Option Explicit %>
<%
'不使用输出缓冲区,直接将运行结果显示在客户端
Response.Buffer = False
'声明待检测数组
Dim ObjTotest(26,4)
ObjTotest(0,0) = "MSWC.AdRotator"
ObjTotest(1,0) = "MSWC.BrowserType"
ObjTotest(2,0) = ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号