I have view named all documents. I want to send a alert message to group using agent whenever new or modified document is happened. Can any one help me how to do this using formula or ls in code form.
Thanks in advance
I have view named all documents. I want to send a alert message to group using agent whenever new or modified document is happened. Can any one help me how to do this using formula or ls in code form.
Thanks in advance
Subject: How to send alert message
You want to send an email alert?
Subject: RE: How to send alert message
Yes I want to send email alert that new document is added or modified
Subject: LS code example
You can call this subroutine almost anywhere agent/event/button … you can also include an attachment link …
Sub SendMailTo( mailReceivers() As String, mailCC As String, mailReplyTo As String, _
mailSubj As String, mailBody As String, mailSender As String )
Dim mailDoc As NotesDocument
Set mailDoc = uCurrDB.CreateDocument
Dim rtItem As New NotesRichTextItem( mailDoc, "body" )
mailDoc.Form = "Memo"
mailDoc.Subject = mailSubj$
If mailReceivers(0) = "" Then
mailReceivers(0) = "some name 1"
mailReceivers(1) = "Doug Jamieson"
End If
mailDoc.SendTo = mailReceivers
mailDoc.CopyTo = mailCC$
If mailSender$ = "" Then
mailDoc.Principal = "agent name here"
Else
mailDoc.Principal = mailSender$
End If
If mailReplyTo$ = "" Then
mailDoc.ReplyTo = mailDoc.Principal(0)
Else
mailDoc.mailReplyTo = mailReplyTo$
End If
Call rtitem.AddNewLine(2)
Call rtitem.AppendText(mailBody$)
Call rtitem.AddNewLine(2)
Call mailDoc.Send( False )
End Sub
Subject: Create a Newsletter Agent
Create an agent that runs “After documents are created or modified” that uses the simple action - “Send Newsletter Summary”
Complete the Newsletter Summary dialog to include the people and message that you want sent when a document is created or modified.
HTH
Regards,
Mat