我用vb编写asplotusnotes.dll,也注册了,在asp中调用始终不成功,不知为什么?请高手帮忙指出错在哪?,谢谢!
以下是asplotusnotes.dll代码,在vb中调用正常通过。
Private MyScriptingContext As ScriptingContext
Private MyApplication As Application
Private MyRequest As Request
Private MyResponse As Response
Private MyServer As Server
Private MySession As Session
Public Sub OnStartPage(PassedScriptingContext As ScriptingContext)
Set MyScriptingContext = PassedScriptingContext
Set MyApplication = MyScriptingContext.Application
Set MyRequest = MyScriptingContext.Request
Set MyResponse = MyScriptingContext.Response
Set MyServer = MyScriptingContext.Server
Set MySession = MyScriptingContext.Session
End Sub
Public Sub OnEndPage()
Set MyScriptingContext = Nothing
Set MyApplication = Nothing
Set MyRequest = Nothing
Set MyResponse = Nothing
Set MyServer = Nothing
Set MySession = Nothing
End Sub
Public Sub SendMail(strMailDbName1 As String, cSubject As String, cstrAttachment As String, cRecipient As String, cCopyToRec As String, cBodyText As String)
Dim oSession ' AS NotesSession
Dim strServer
Dim strUserName
Dim strMailDbName
Dim oCurrentMailDb
Dim oMailDoc
Dim ortItem
Dim ortAttacment
Dim oEmbedObject
Set oSession = CreateObject("Notes.NotesSession")
strServer = oSession.GetEnvironmentString("MailServer", True)
strUserName = oSession.UserName
strMailDbName = Trim(strMailDbName1)
Set oCurrentMailDb = oSession.CurrentDatabase
If oCurrentMailDb.IsOpen = True Then
Else
oCurrentMailDb.OPENMAIL
End If
Set oMailDoc = oCurrentMailDb.CREATEDOCUMENT
oMailDoc.Form = "Memo"
With oMailDoc
.SendTo = Trim(cRecipient) '收件人
'.BlindCopyTo = cRecipient
.CopyTo = Trim(cCopyToRec) '抄送