Mail Server name by lotusscript

How can i get the user domino server by lotusscript / formulla language? if i use "@MailDbName", it returns "" (blank string) if user logs into his local replica.

i want to trace the domino server name of the user (may be from location document->server->mail/home server field). or is there any other way to get domino server name by lotusscript/formulla language?
Amitava_MukherjeeAsked:
Who is Participating?
 
Amitava_MukherjeeAuthor Commented:
Please give me some time to try out this solutions. I will be back within 24 hours.
0
 
zzx999Commented:
any of those should help:
   1. Get home mail server - using eval("@MailDbName");
   2. open names.nsf on that server - notesSession.getDatabase (server, "names.nsf")
   3. open the Servers view - db.OpenView ("Servers")
   4. get collection of all server names from that view - col = vw.allEntries
   5. iterate over all and get server names - notesViewEntry.ColumnValues(3)
0
 
Amitava_MukherjeeAuthor Commented:
first of all as i mentioned earlier "@MailDbName" oftens returns null string if user uses local copy of the lotus. so point 1 and 2 is irrelevant. in point no 3 as far as i understand db=notesdatabase. but for declaration of this db one parameter is domino server name. can you please make your comment clear?

i am a novice in this field, can u please make a bit clearer for me please?
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

 
zzx999Commented:
What's you server version?
0
 
Amitava_MukherjeeAuthor Commented:
My server version is 7.0.2. But i want to make a customized send button in the lotus client where the code will execute. Lotus client version is also 7.0.2.
0
 
zzx999Commented:
@MailDbName returns an empty string ("") if:
          o The database is local
          o The formula is used in a Scheduled agent running on the server
Try use @Name to extract a part of the name; for example, [CN] to extract the common name.
0
 
jagaduriCommented:
Hi use the below code... it will fetch the mail server from your notes.ini file even if ur in Local.

Dim session As New NotesSession
Dim server As String
server = session.GetEnvironmentString("MailServer", True)
Msgbox server

Try and let me know
0
 
Sjef BosmanGroupware ConsultantCommented:
In order to send a mail you don't need to know the server name. @MailDbName returns "server":"filename", and by definition, when the user opens a local replica, it returns "":"filename" (i.e. a list of two values, the first being the empty string).

Comes the question: what do you want to trace? Did you know that there are very interesting fields in a received mail? For example: Received, RouteServers and RouteTimes.

If you REALLY want to trace mail, enable Mail Tracking on the server. If you want to log ALL mail, enable Mail Journalling on the server.
0
 
jagaduriCommented:
Amitava_Mukherjee is it working?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.