您的位置:程序门 -> 企业开发 -> lotus



用代理发送邮件


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


用代理发送邮件[已结贴,结贴人:arlen0706]
发表于:2007-06-22 08:56:19 楼主
cs下,要用代理实现邮件发送,且在邮件中夹带附件,附件是指定路径的,要如何实现?(邮件要发送到163邮箱的)
发表于:2007-06-22 09:15:371楼 得分:10
可以把附件先上载到邮件的   body域中,然后在发送,要给163,那就要设置能对外发邮件了的
发表于:2007-06-22 09:20:032楼 得分:10
首先你要保证你的邮件服务器能发送邮件到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



快速检索

最新资讯
热门点击