当前位置:DOS资源站资料中心VBS脚本 → VBS终极应用 微型邮箱客户端 1K不到 带发送附件功能

VBS终极应用 微型邮箱客户端 1K不到 带发送附件功能

减小字体 增大字体 作者:佚名  来源:本站整理  发布时间:2008-5-26 17:53:42

我见过最小的邮箱客户端了,,整个程序不到1K ,刚好888字节。

还带附件发送功能

本来还可以压的更小的,888太顺利了,就不继续优化了。

   这个代码还可以扩展使用,留待有空在研究了。

   以下是源码。复制保存为VBS文件就可以运行了 下载点这里

-----------------------------------------分割线-----------------------------------------------------

'By Jerry Ye
On Error Resume Next
f=InputBox("From Email:","msg","username@163.com")
smtp=InputBox("SMTP:","msg","smtp.163.com")
u=InputBox("User:","msg","username")
p=InputBox("Pass:","msg","password")
t=InputBox("To Email:","msg","username@126.com")
m=InputBox("邮件主题:","msg","Test send mail")
msg=InputBox("邮件内容:","msg","Send success")
j=InputBox("附件路径:","msg","C:\test.rar")
NameSpace = "http://schemas.microsoft.com/cdo/configuration/"
Set Email = createObject("CDO.Message")
Email.From = f
Email.To = t
Email.Subject = m
Email.Textbody = msg
Email.AddAttachment j
With Email.Configuration.Fields
.Item(NameSpace&"sendusing") = 2
.Item(NameSpace&"smtpserver") = smtp
.Item(NameSpace&"smtpserverport") = 25
.Item(NameSpace&"smtpauthenticate") = 1
.Item(NameSpace&"sendusername") = u
.Item(NameSpace&"sendpassword") = p
.update
End With
Email.Send

---------------------------------------------分割线-----------------------------------------------------------