当启用了WinWebMail中的短消息数据存储功能之后,您将可以使用WinWebMail系统提供的标准组件接口,在其他的各种开发工具中(如:VB、VC、ASP、Delphi、C++ Builder)对邮件系统的邮件简要信息进行提取和管理操作。
版本要求:3.5.0.1版或更高版本
下载 Example.zip (2K)
Dim esm
' 创建EMSMS对象
Set esm = Server.CreateObject("EMSMS.sms")
' 导入指定SMS文件夹中的所有数据
esm.Load ("C:\WinWebMail\sms\")
Response.Write "当前数据总数: " %26amp; esm.Count %26amp; "
"
if esm.Count 0 then
' 取最后一条数据的信息
esm.Get esm.Count - 1
Response.Write "取最后一条数据的信息:
"
Response.Write "发件人名: " %26amp; esm.FromName %26amp; "
"
Response.Write "发件人地址: " %26amp; esm.FromMail %26amp; "
"
Response.Write "收件人帐号: " %26amp; esm.To %26amp; "
"
Response.Write "邮件重要度: " %26amp; esm.Priority %26amp; "
"
Response.Write "收件时间: " %26amp; esm.ReceiveTime %26amp; "
"
Response.Write "发件时间: " %26amp; esm.SendTime %26amp; "
"
Response.Write "邮件大小: " %26amp; esm.Size %26amp; "
"
Response.Write "邮件主题: " %26amp; esm.Subject %26amp; "
"
end if
Dim i
i = 0
' 删除所有发件人地址为: admin@system.mail 的数据
Do While i
esm.Get i
If esm.FromMail = "admin@system.mail" Then
esm.RemoveIt i
i = i - 1
End If
i = i + 1
Loop
Set esm = Nothing
%
,