Home > Domino Tips > Administrator > E-mail > No more delayed email
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

E-MAIL

No more delayed email


Peder Koed Pedersen
01.04.2006
Rating: -2.40- (out of 5)


Lotus Notes and Domino tips, tutorials and how-to articles
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


My users frequently complain that their e-mails are delayed. They also complain that they receive a "New mail warning," but e-mails don't appear in their inboxes until an hour later. This is because they were using their "Local mail file" even though their location is "Office."

I solved the problem by restricting my users to two different Locationdoc's: "Office" and "Travel." I know that "Office" is the wrong when using Mailfile on Local( db.Server is "blank" ).

  
Sub Postopen(Source As Notesuidatabase) 
' ******* Test for local mail file - Begin ********
 Dim session As New NotesSession
 Dim db As NotesDatabase
 Set db = session.CurrentDatabase
 Dim loca As String
 Dim comma As String
 Dim lname As String
 If ( db.Server = "" ) Then
  loca = session.GetEnvironmentString
( "Location", True )
  comma = Instr ( loca , "," )
  lname = Left ( loca, comma -1)
  If lname = "Office" Then
   Messagebox "
You are now using your LOCALE mailfile" , 
MB_ICONEXCLAMATION, " 
******* WARNING ********* "
  Else
  End If
 Else
 End If  
' ******* Test for local mail file - End ******** 
End Sub

I know that not all Administrators are allowed the luxury of restricting their users to two locations. So here is some extended code to check the actual value in the location used.

Sub Postopen(Source As Notesuidatabase) 
' *******  Test for local mail file ******** 
        Dim session As New NotesSession 
        Dim db As NotesDatabase 
        Set db = session.CurrentDatabase 
        Dim lok As String 
        Dim komma As String 
        Dim lname As String 
        ' ** Server = _blank then file is on local,
so now find name on Location used 
        If ( db.Server = "" ) Then 
                lok = session.GetEnvironmentString
( "Location", True ) 
                komma = Instr ( lok , "," ) 
                lname = Left ( lok, komma -1) 
                
                ' ** The Find path to local mail file 
                Dim sTemp As String, sNab As String 
                Dim view As NotesView 
                
                '** Get and parse the 
NAB setting stored in INI file 
                sTemp = 
session.GetEnvironmentString("NAMES", True) 
                
                ' ** Allow for the possibility 
of multiple NABs being specified 
- if so, take only the first one 
                If Instr(sTemp, ",") Then 
                        sNab = Trim(Strleft(sTemp, ",")) 
                End If 
                If Instr(sTemp, ";") Then 
                        sNab = Trim(Strleft(sTemp, ";")) 
                End If 
                
                ' ** Get only Names.nsf 
                If sNab = "" Then 
                        sNab = "Names.nsf" 
                End If 
                Set db = New NotesDatabase("",sNab) 
                Set view = db.GetView("Locations") 
                
                ' ** Now get "Mail file location" 
[Field=MailType ( on Server=0 Local=1 ) ] 
                Dim doc As NotesDocument 
                Set doc = view.Getdocumentbykey (lname) 
                If Not (doc Is Nothing) Then 
                        If doc.GetItemValue( "MailType" ) 
(0) = "0" Then 
                '        Messagebox " Mail-type " 
& doc.GetItemValue( "MailType" ) (0) 
                                Messagebox 
"You are now using 
your LOCALE mailfile" , MB_ICONEXCLAMATION, 
"******* Warning *********" 
                        Else 
                        End If 
                Else 
                End If                 
        Else 
        End If                 
' *******  Test for local mail file ********         
End Sub


Do you have comments on this tip? Let us know.

This tip was submitted to the SearchDomino.com tip library by member Peder Koed. Please let others know how useful it is via the rating scale below. Do you have a useful Lotus Notes, Domino, Workplace or WebSphere tip or code snippet to share? Submit it to our monthly tip contest and you could win a prize.

Rate this Tip
To rate tips, you must be a member of SearchDomino.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



RELATED CONTENT
E-mail
Secure Lotus Notes/Domino 8.x from mail to unknown recipients
Domino server setting and email policy tricks admins must know
Top 10 Lotus Notes/Domino administration tips of 2008
Can Lotus Notes/Domino and Microsoft SharePoint play nice together?
Using Formula language code to sort Lotus Notes messages by subject
LotusScript action button manages Lotus Notes mail files
Exploring Lotus Notes Domino 8.0.1 and beyond
LotusScript agent moves tagged spam email to junk mail folder
Send SMS text messages between Lotus Notes 7 and mobile devices
Update to Exchange Server 2003 Connector for Lotus Notes

Lotus Notes Domino Mailbox Management
Secure Lotus Notes/Domino 8.x from mail to unknown recipients
Run or restart Notes/Domino agents via text messages
How to create mail files using a LotusScript agent
How to turn off the message recall feature in Lotus Notes 8
Domino server setting and email policy tricks admins must know
Customize the principal field of outgoing email messages
LotusScript action button manages Lotus Notes mail files
JavaScript error encountered when opening Lotus Notes email
Bringing MailRule documents back into view
LotusScript agent moves tagged spam email to junk mail folder

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Domino & Lotus Notes Security Solutions: Authentication, Antispam, Encryption and Antivirus
HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts