• ASP通过SMTP发邮件


    <%
        
    Const SMTPServerIP = "mail.idg-rbi.com.cn"

        
    Dim strFrom, strTo,strSuject, strBody
        strFrom 
    = "webmaster@idg-rbi.com.cn"
        strTo 
    = "kong123@citiz.net"
        strSubject 
    = "test"
        strBody 
    = "test"
        
        
    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.Item(sch 
    & "sendusername"= strFrom
        cdoConfig.Fields.Item(sch 
    & "sendpassword"= "8888"
        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
        
        
    'session.Timeout=600

        cdo.Send

        
    Set cdoConfig = Nothing
        
    Set cdo = Nothing
    %
    >

  • 相关阅读:
    ajax 同步模式与异步模式
    Ajax -get 请求
    Ajax -post 请求
    Ajax 遵循HTTP协议
    Ajax 发送请求
    宽高自适应案例
    伸缩导航案例
    伸缩属性的 grow与 shrink
    伸缩布局
    hdu-5858 Hard problem(数学)
  • 原文地址:https://www.cnblogs.com/goodspeed/p/316264.html
Copyright © 2020-2023  润新知