惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Simon Willison's Weblog
Simon Willison's Weblog
P
Privacy International News Feed
www.infosecurity-magazine.com
www.infosecurity-magazine.com
T
Troy Hunt's Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
Attack and Defense Labs
Attack and Defense Labs
S
Secure Thoughts
V2EX - 技术
V2EX - 技术
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
O
OpenAI News
Cloudbric
Cloudbric
Google Online Security Blog
Google Online Security Blog
Schneier on Security
Schneier on Security
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Help Net Security
Help Net Security
Cyberwarzone
Cyberwarzone
G
GRAHAM CLULEY
L
Lohrmann on Cybersecurity
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Spread Privacy
Spread Privacy
NISL@THU
NISL@THU
N
News and Events Feed by Topic
T
Tenable Blog
S
Security @ Cisco Blogs
N
News and Events Feed by Topic
The Hacker News
The Hacker News
C
CXSECURITY Database RSS Feed - CXSecurity.com
宝玉的分享
宝玉的分享
月光博客
月光博客
酷 壳 – CoolShell
酷 壳 – CoolShell
美团技术团队
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google DeepMind News
Google DeepMind News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Tailwind CSS Blog
V
Visual Studio Blog
P
Proofpoint News Feed
Webroot Blog
Webroot Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 三生石上(FineUI控件)
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Jina AI
Jina AI
雷峰网
雷峰网
T
The Blog of Author Tim Ferriss
Hugging Face - Blog
Hugging Face - Blog
腾讯CDC
L
LangChain Blog
The Register - Security
The Register - Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 聂微东

博客园 - Lee Vane

无法通过“控制面板”卸载 Office 2003、Office 2007 或 Office 2010 套件的情况下,如何才能将其卸载? 量子恒道统计-淘宝添加步骤 朋友写的,我觉得比较好,批量生产HTML中使用的 使用CSS设计了一个导航栏(仿康盛创想) 文章内容分页 可点击的下拉菜单 ASP多行多列显示代码- 5行 Formfieldhints.--表单提示效果 项目分享---google calendar.(日历,java版). asp根据出生时间判断生肖 用 JavaScript 实现网页图片等比例缩放 ASP数据库操作类 新闻标题太长加省略号和对内容太长分页 格式化日期 ASP函数,实现多个功能的弹出对话框 全选并改变TR颜色 选择文字就能选择复选框 简洁的TAB 阿里妈妈的商城分类效果一
检查组件是否已经安装,用Jmail组件发送邮件
Lee Vane · 2008-09-26 · via 博客园 - Lee Vane

 '***************************************************
'函数名:IsObjInstalled
'作  用:检查组件是否已经安装
'参  数:strClassString ----组件名
'返回值:True  ----已经安装
'       False ----没有安装
'***************************************************
Function IsObjInstalled(strClassString)
 On Error Resume Next
 IsObjInstalled = False
 Err = 0
 Dim xTestObj
 Set xTestObj = Server.CreateObject(strClassString)
 If 0 = Err Then IsObjInstalled = True
 Set xTestObj = Nothing
 Err = 0
End Function

'**************************************************
'函数名:SendMail
'作  用:用Jmail组件发送邮件
'参  数:MailtoAddress  ----收信人地址
'        MailtoName    -----收信人姓名
'        Subject       -----主题
'        MailBody      -----信件内容
'        FromName      -----发信人姓名
'        MailFrom      -----发信人地址
'        Priority      -----信件优先级
'**************************************************
function SendMail(Email,MailtoName,Subject,MailBody,FromName,MailFrom,Priority)
 on error resume next
 Dim JMail
 Set JMail=Server.CreateObject("JMAIL.Message")
 if err then
  SendMail= "<br><li>没有安装JMail组件</li>"
  err.clear
  exit function
 end if 
 JMail.Charset="gb2312"          '邮件编码
 JMail.silent=true
 JmailMsg.Logging = true
 JMail.ContentType = "text/html"     '邮件正文格式
 JMail.ServerAddress=MailServer     '用来发送邮件的SMTP服务器
    '如果服务器需要SMTP身份验证则还需指定以下参数
 JMail.MailServerUserName = MailServerUserName    '登录用户名
    JMail.MailServerPassWord = MailServerPassword        '登录密码
    JMail.MailDomain = MailDomain       '域名(如果用“name@domain.com”这样的用户名登录时,请指明domain.com
 JMail.AddRecipient Email,MailtoName     '收信人
 JMail.Subject = Subject         '主题
 JMail.HMTLBody = MailBody       '邮件正文(HTML格式)
 JMail.Body = MailBody          '邮件正文(纯文本格式)
 JMail.FromName = FromName         '发信人姓名
 JMail.From = MailFrom         '发信人Email
 JMail.Priority=Priority              '邮件等级,1为加急,3为普通,5为低级
 JMail.Send MailServer
 SendMail =JMail.ErrorMessage
 JMail.Close
 Set JMail=nothing
end function
 
 '********************************************
'函数名:IsValidEmail
'作  用:检查Email地址合法性
'参  数:email ----要检查的Email地址
'返回值:True  ----Email地址合法
'       False ----Email地址不合法
'********************************************
function IsValidEmail(email)
 dim names, name, i, c
 IsValidEmail = true
 names = Split(email, "@")
 if UBound(names) <> 1 then
    IsValidEmail = false
    exit function
 end if
 for each name in names
  if Len(name) <= 0 then
   IsValidEmail = false
      exit function
  end if
  for i = 1 to Len(name)
      c = Lcase(Mid(name, i, 1))
   if InStr("abcdefghijklmnopqrstuvwxyz_-.", c) <= 0 and not IsNumeric(c) then
         IsValidEmail = false
         exit function
       end if
    next
    if Left(name, 1) = "." or Right(name, 1) = "." then
       IsValidEmail = false
       exit function
    end if
 next
 if InStr(names(1), ".") <= 0 then
  IsValidEmail = false
    exit function
 end if
 i = Len(names(1)) - InStrRev(names(1), ".")
 if i <> 2 and i <> 3 then
    IsValidEmail = false
    exit function
 end if
 if InStr(email, "..") > 0 then
    IsValidEmail = false
 end if
end function