Get handle to Usersmailfile in browser including correct TCPaddress of home mailserver

This tips explains how to retrieve mailfile location and server DNS/WINS name or IP address.

When you want the user to be able to link to his own mailfile from a web application database on any server. We need to know the mailfile location and the server dns/wins name or IP address. This piece of formula retrieve the information and builds it to a basic http link which you can used to build your anchor and/or extend it with a viewopen or anything you like.


REM "GET USER MAILFILE LOCATION";
NAB:="names.nsf";
MailFile:=@DbLookup( "" : "NoCache" ; "" :NAB ;"($Users)" ; @Username ;"MailFile" );
REM "GET HOMEMAIL SERVER";
MailServer:=@DbLookup( "" : "NoCache" ; "" :NAB ;"($Users)" ; @Username ;"MailServer" );
REM "GET IP ADDRESS OR DNS ENTRY OF SERVER";
ENABLED:=@DbLookup( "" : "NoCache" ; "" :NAB ;"($Servers)" ;MailServer ;"EnabledList" );
REM "DETERMINE ENABLED TCP PORT";
USE:=@If(@Subset(ENABLED;1)="1" & @DbLookup( "" : "NoCache" ; "" :NAB ;"($Servers)" ;MailServer ;"Protocol_0" )="TCP";"0";@Subset(ENABLED;2)="1" & @DbLookup( "" : "NoCache" ; "" :NAB ;"($Servers)" ;MailServer ;"Protocol_1" )="TCP";"1";@Subset(ENABLED;3)="1" & @DbLookup( "" : "NoCache" ; "" :NAB ;"($Servers)" ;MailServer ;"Protocol_2" )="TCP";"2";@Subset(ENABLED;4)="1" & @DbLookup( "" : "NoCache" ; "" :NAB ;"($Servers)" ;MailServer ;"Protocol_3" )="TCP";"3";@Subset(ENABLED;5)="1" & @DbLookup( "" : "NoCache" ; "" :NAB ;"($Servers)" ;MailServer ;"Protocol_4" )="TCP";"4";@Subset(ENABLED;6)="1" & @DbLookup( "" : "NoCache" ; "" :NAB ;"($Servers)" ;MailServer ;"Protocol_5" )="TCP";"5";@Subset(ENABLED;7)="1" & @DbLookup( "" : "NoCache" ; "" :NAB ;"($Servers)" ;MailServer ;"Protocol_6" )="TCP";"6";@Subset(ENABLED;8)="1" & @DbLookup( "" : "NoCache" ; "" :NAB ;"($Servers)" ;MailServer ;"Protocol_7" )="TCP";"7";"");
NETADDRESS:=@DbLookup( "" : "NoCache" ; "" :"names.nsf" ;"($Servers)" ;MailServer ;@Trim("NetAddr_"+@Trim(USE)) );
REM "BUILD HTTP ADDRESS OF MAILFILE";
"http://"+NETADDRESS+"/"+@If(@Right(MailFile;4)=".nsf";MailFile;MailFile+".nsf");
This was last published in July 2002

Dig Deeper on Domino Resources - Part 7

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchEnterpriseLinux

SearchDataCenter

SearchExchange

SearchContentManagement

Close