呵呵,我还是找到了办法,贴出来与大家分享:
oMAPISession = create("MSMAPI.MAPISession")
oMAPIMessages= create("MSMAPI.MAPIMessages")
with oMAPISession
.logonui=.T.
.DownloadMail = .F.
.signon()
if .SessionID <= 0
messagebox('登录失败!')
return .f.
endif
endwith
with oMAPIMessages
.sessionid = oMAPISession.sessionid
*清除缓冲区
.compose()
.recipIndex = .recipCount
.recipDisplayname= "Email发送人"
.recipaddress = "Email目标地址"
.reciptype=1 &&--1=收件者(內定值)
.ResolveName()
.msgsubject= "标题"
.msgNoteText = "内容"
*Attach the files.
.AttachmentIndex = 0
.AttachmentPathName = '附件文件名'
.AttachmentName = '附件显示的文件名'
.send(0)
endwith