RE: Alert like 'You have new Mail' Guy R Thomas 21.Oct.03 06:38 AM a Web browser Domino Designer -- Agents 4.6.6Windows NT
You would have to use lotus script I think (If you're not any good at lotus script you will struggle.)
Also, as previously mentioned, you would have to make sure that the agent had access to each users mail file.
We used to have an agent that modified peoples mail files. Every mail file had an entry for our server so we simply signed the agent with the server's ID to ensure it had access.
There is a hidden view in public address books called ($VIMPeople).
In script you need to open your public address book(s) and find out where each persons mail file exists.
This code should give you an idea of how to do it but it is definately going to need changing before it will work.
Dim session As New NotesSession
Dim books As Variant
Dim peopleView as notesView
Dim personDoc as notesDocument
Dim mailFile as string
Dim mailServer as string
Dim reminderDoc as notesDocument
Dim mailDb as new notesDatabase("","")
books = session.AddressBooks
Forall b In books
Call b.Open( "", "" )
set peopleView=b.getView("($VIMPeople)")
%REM
put your code in here to try and get each persons person doc and locate their mail file.
e.g.
set personDoc=peopleView.getDocumentByKey("Fred Smith/Org/Domain")
if not personDoc is nothing then
mailFile=personDoc.MailFile(0)
mailServer=personDoc.MailServer(0)
' You can then open that persons mail database by using
call mailDb.open(mailFile,mailServer)
' then you can create a reminder document using
reminderDoc=mailDb.createDocument
reminderDoc.form="Appointment"
reminderDoc.AppointmentType="4"
call reminderDoc.replaceItemValue("$Alarm",1)
call reminderDoc.replaceItemValue("$AlarmDescription","You've got some mail")
' set alarm time to now so that it appears straight away for user.
call reminderDoc.replaceItemValue("$AlarmTime",now)
call reminderDoc.save(true,true)
else
mailFile=""
mailServer=""
end if
%END REM
End Forall
P.S. Don't forget to remove the REM statements if you want the sample code I've put in to do something (you will still need to modify it to make it work properly.)