CS下,要用代理实现邮件发送,且在邮件中夹带附件,附件是指定路径的,要如何实现?(邮件要发送到163邮箱的)
------解决方案--------------------
可以把附件先上载到邮件的 body域中,然后在发送,要给163,那就要设置能对外发邮件了的
------解决方案--------------------
首先你要保证你的邮件服务器能发送邮件到163.com,
第二,在代理中写如下代码
sub sendmail()
dim ndb as NotesDatabase
dim ndoc as NotesDocument
dim nbody as NotesRichTextItem
dim ns as new NotesSession
set ndb=ns.currentDatabase()
set senddoc=db.createdocument()
set nbody=new NotesRichTextItem(senddoc, "Body ")
call nbody.appendtext( "I am papa ")
call ndoc.embedObject( "C:\ImUrpapa ")
call senddoc.send(false)
senddoc.Subject= "test agent sendmail "
set nbody=Nothing
set nDoc=Nothing
set nDB=Nothing
set nSession=Nothing
End Sub