Search DominoPower's 11,425 Lotus-related article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
How to audit your address book: more code (continued)

Now we check the mail system fields for the person document to see if they at least seem reasonable. The first check tells us if we have a person document with a non-Notes mail system.

If you manage your Domino directories closely, you'll want to know about these, because they are potentially "foreign" entries: people who aren't in your Notes system and therefore may be better kept in a secondary directory.

'7. check mailsystem fields
If pers.mailsystem(0) <> "1" Then 'mail system not Notes
Call reportdocbody.addtab(1)
Call ReportDocBody.appendtext("(2): Mail System value is not 1 (Notes): " & pers.mailsystem(0))
Call reportdocbody.addnewline(1)
sev(2) = True
Else

We also check that we have a mail server specified, and we then go look in the servers view to see if this is a server in this domain. If not, we report it. This could be a person record for someone who has left the company and whose mail server no longer exists. Or it could be an error!

If pers.mailserver(0) = "" Then
Call reportdocbody.addtab(1)
Call ReportDocBody.appendtext("(1): Notes mail user: no mail server name specified")
Call reportdocbody.addnewline(1)
sev(1) = True
Else 'is this one of the servers in this domain
Set ServerDoc = ServerView.getdocumentbykey(pers.mailserver(0),True)
If ServerDoc Is Nothing Then 'server not found
Call reportdocbody.addtab(1)
Call ReportDocBody.appendtext("(1): Mail Server specified is not in this domain: " & pers.mailserver(0))
Call reportdocbody.addnewline(1)
sev(1) = True
End If
End If

And then we check the Notes domain is what we expect. You will have to change this for your installation.

If Ucase(pers.maildomain(0)) <> "Unipart" Then '<<<< enter here and here VV (below) the the mail domain name
Call reportdocbody.addtab(1)
Call ReportDocBody.appendtext("(2): Notes mail user: mail domain is not Unipart:" & pers.maildomain(0))
Call reportdocbody.addnewline(1)
sev(2) = True
End If
End If 'Mail system is Notes

The next check is on the email address to see if it's in the right corporate format of firstname/underscore/lastname@domainname. If not, we check to see if it's an old internet address format, shortname@olddomain1 or olddomain2, or if it's some other format completely.

'8. Check Internet address
If pers.internetaddress(0) = "" Then
Call reportdocbody.addtab(1)
Call ReportDocBody.appendtext("(3): No Internet Address specified.")
Call reportdocbody.addnewline(1)
sev(3) = True
End If

If Lcase(pers.internetaddress(0)) <> Lcase(pers.firstname(0) & "_" & pers.lastname(0) & "@newdomain.com") Then 'acceptable
If Lcase(pers.internetaddress(0)) = Lcase(pers.shortname(0) & "@olddomain1.com") Or _
Lcase(pers.internetaddress(0)) = Lcase(pers.shortname(0) & "@olddomain2.com") Then 'one of the old forms
Call reportdocbody.addtab(1)
Call ReportDocBody.appendtext("(2): Internet address is not the new corporate standard: " & pers.internetaddress(0))
Call reportdocbody.addnewline(1)
sev(2) = True
Else
Call reportdocbody.addtab(1)
Call ReportDocBody.appendtext("(1): Internet address is of an unexpected form: " & pers.internetaddress(0))
Call reportdocbody.addnewline(1)
sev(1) = True
End If
End If


« Previous  ·  1  ·  2  ·  3  ·  4  ·  5  ·  Next »
Other articles you might like
Home > Lotus Technologies > LotusScript (64 articles)
   When the debugger won't debug hidden code that isn't hidden
   What to do if the LotusScript debugger won't single-step over code
   Little known traps about Lotus Notes fields
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent DominoPower Articles
Application development, William Shatner, and the origin of the universe
Learn Domino Designer 8.5 for free
The (near) future of Sametime, Quickr, Connections, and Symphony
Inside the IBM Innovations lab
Lotusphere 2010: Hot fixes and cool news for Notes, Domino, and LotusLive
Lotusphere 2010: mobility and collaboration
2010: A Lotusphere of change
Latest Lotus Headlines
Quickr place Superusers
Writing Client-Side Javascript for Re-Use
Lotus Notes R8.5.1: Bug in Contacts "Print Selected View"
New Notes/Domino Technotes published about Chile's extended daylight saving time
SnnT: How to prevent Google from listing your Sametime Server
How to send someone an email that shows your calendar availability
"The collection has become invalid"
>> Read all the news
More from the ZATZ journals
Computing Unplugged: The iPad defenders have spoken
David Gewirtz Online: CNN commentary and analysis
OutlookPower: More about disappearing text
-- 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 --

Teamstudio Edition 25 has shipped
It's finally here! Now that Teamstudio Edition 25 has shipped, listen to our latest Tool Time audio program to find out what's changed. Updates to all your favorite Teamstudio tools will be discussed.

Plus, you'll get an introduction to Teamstudio Undo (formerly known as Teamstudio Snapper).

Tap here to get started!

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login