|
|
|
|
|
|
|
|
|
|
|
|
|
|
How to audit your address book: more code (continued)
The last check of all is whether there is a forwarding address. I'm personally not in favor of the use of forwarding addresses. Why? Well, do you want corporate mail being forwarded to Hotmail? It seems that many people have their mail forwarded when they go on holiday, or just have it sent to their home email address. I personally go on holiday when I'm on holiday, and don't check my mail at all. And I'm really not keen on corporate mail being forwarded on to potentially insecure email systems. If it's important to the company that people can reach their email when they're away from their desks, then the company should, in my opinion, either give people a laptop and Notes to travel with or set up a secure corporate Webmail/iNotes portal. Forwarding mail to a public system is, in my mind, totally unacceptable. Rant over. It's your call.
'9. Forwarding addresses
If pers.mailaddress(0) <> "" Then
Call reportdocbody.addtab(1)
Call ReportDocBody.appendtext("(2): Forwarding Address specified: " & pers.mailaddress(0))
Call reportdocbody.addnewline(1)
sev(2) = True
End If
|
Now we determine the highest severity we encountered in checking this person record.
'do the counts
count(0) = count(0) + 1
If sev(1) = True Then
count(1) = count(1) + 1
Elseif sev(2) = True Then
count(2) = count(2) + 1
Elseif sev(3) = True Then
count(3) = count(3) + 1
End If
End If 'it's a person record
Set pers = users.getnextdocument(pers)
Loop
|
And finally we complete the report and email it.
Call reportdocbody.addnewline(1)
Call ReportDocBody.appendtext("Total number of Person records examined: " & count(0))
Call reportdocbody.addnewline(1)
Call reportdocbody.appendtext("Highest Severity:")
Call reportdocbody.addnewline(1)
Call ReportDocBody.appendtext("...Severity 1: ")
Call reportdocbody.addtab(1)
Call reportdocbody.appendtext(count(1))
Call reportdocbody.addnewline(1)
Call ReportDocBody.appendtext("...Severity 2: ")
Call reportdocbody.addtab(1)
Call reportdocbody.appendtext(count(2))
Call reportdocbody.addnewline(1)
Call ReportDocBody.appendtext("...Severity 3: ")
Call reportdocbody.addtab(1)
Call reportdocbody.appendtext(count(3))
Call reportdocbody.addnewline(1)
Call ReportDocBody.appendtext("...No issues: ")
Call reportdocbody.addtab(1)
Call reportdocbody.appendtext(count(0) - count(1) - count(2) - count(3) )
Call reportdocbody.addnewline(1)
Call reportdoc.send(False)
End Sub
|
What else could you do? I said earlier that I would make suggestions for improvement. Here are a few.
The obvious one
Clean up the way the code is run. Add a dialog, either simply via Msgbox, or via a NotesUIWorkspace.DialogBox call to obtain the server name and directory name. You could also allow the user just to specify a server and assume that the directory is called names.nsf unless a value is given. This avoids the need to make code changes to run in a different domain.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Advertisement --
Learn Notes and Domino 8 at your place and pace!
Learn Notes and Domino in your office and/or home! TLCC's highly acclaimed distance learning courses for users, developers, and admins will enhance your career and your resume.
The many included activities and demos will make you a pro! Expert instructor help is a click away.
Click here to try a FREE demo course!! |
-- Advertisement --
Mark your calendar for in-depth Lotus training, May 12-14, Boston
Join experts and peers May 12-14 in Boston for educational and networking events that deliver real-world Lotus training so you can increase productivity and efficiency in your company, advance your skills, and squeeze the most from your current environment. One registration gets you into THE VIEW's Admin2010 and Lotus Developer2010.
Register by April 10 to save $200. |
|
|
|
|
|
|
|
|
|
|