我有一个网络表单,当按下按钮时应该从字段中提取名称列表并发送邮件。邮件没有发送....这是莲花脚本...在此先感谢
Sub Click(Source As Button)
Dim s As New NotesSession
Dim ws As New NotesUIWorkspace
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim mdoc As NotesDocument
Dim ddoc As NotesDocument
If ws.CurrentDocument.IsNewDoc Then
Call ws.CurrentDocument.Save
Set db = s.CurrentDatabase
Set view = db.GetView("deptLookup")
Set doc = ws.CurrentDocument.Document
dept$ = doc.ProcDeptAssoc(0)
Set ddoc = view.GetDocumentByKey(dept$)
If ddoc Is Nothing Then
Msgbox "Department not found"
Else
Set mdoc = New NotesDocument(db)
mdoc.Subject = "Comment made on procedure " + doc.ProcNo(0) +" - "+doc.ProcName(0)+ " by " + doc.CreatedBy(0)
Dim rtitem As New NotesRichTextItem(mdoc, "Body")
Call rtitem.AppendText("Requires the approval of " +doc.approver(0)+", click the link and the approve or deny the request. ")
Call rtitem.AddNewline(1)
Call rtitem.AppendDocLink(doc, "CommentsDoc")
receipients = ddoc.NotifyName
mdoc.SendTo = receipients
mdoc.Send(False)
End If
Else
Call ws.CurrentDocument.Save
End If
ws.CurrentDocument.Close
End Sub