您的位置:程序门 -> vb -> 基础类



vb 发送邮件的问题,急等!!!


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


vb 发送邮件的问题,急等!!!
发表于:2008-02-25 10:20:19 楼主
我用access   写了一段程序,希望可以发送e-mail   ,但每次运行到mymail.sendmail的时候,log   文件中总会显示
“vb   error   53:   file     doesn't   exist”   ,   没有任何错误提示,也收不到e-mail。请各位高手指点,谢谢!!!

option   compare   database

public   mymail   as   maildll     '   need   to   declare   this
public   strmail   as   string

'
dim   strtoserver,   strtomail,   strfrommail   as   string
dim   strcontent   as   string
dim   strattachment   as   string

'=============================
set   mymail   =   new   maildll
strtoserver   =   "scmh1.nsc.com"
strtomail   =   "shuguang.liang@nsc.com,john.feng@nsc.com,cz.helpdesk@nsc.com"
strfrommail   =   "epc_report@nsc.com"
mymail.toserver   =   strtoserver
mymail.tomail   =   strtomail
mymail.frommail   =   strfrommail
mymail.tomessage   =   content   &   vbcrlf   &   "======================"
mymail.tosubject   =   subject
mymail.mail_log   =   currentproject.path   &   "\epcperf.txt"     'log   file   path
mymail.sendmail

'=============================
set   mymail   =   nothing

exit   sub

errorhandler:
    open   currentproject.path   &   "\epcperf.txt"   for   append   as   #4     'error   file   path
    print   #4,   err.description
    close   #4
end   sub
发表于:2008-02-25 10:29:061楼 得分:0
对了,我的os是win2003,并且我已经做过注册:
regsvr32   "maildllv13.dll"


快速检索

最新资讯
热门点击