| 发表于: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 |
|
|
|
|