zoukankan      html  css  js  c++  java
  • 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
    %
    >

  • 相关阅读:
    C#读取数据库字节流生成图片
    twitter通过oAuth验证获取json数据
    C#读写txt文件
    asp.net分页方法
    sql分页代码
    acm寒假特辑 1月19日 CodeForces
    acm寒假特辑 1月25日 CodeForces
    snow miku 日记
    错排问题(个人总结/复习用)
    acm寒假特辑 2月2日 HDU
  • 原文地址:https://www.cnblogs.com/goodspeed/p/316264.html
Copyright © 2011-2022 走看看