lotusscript to webmail

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


will it works in webmail of lotus? if not, what will be the code to run it from webmail?
Amitava_MukherjeeAsked:
Who is Participating?
 
CRAKCommented:
It cannot be used in a web environment as I explained earlier. If it is executed in an agent that was triggered by an action in the web interface, then it would at least provide you with the wrong details as you would retrieve info from the server's notes.ini.

You'd really have to access names.nsf on the server (unless you're using multiple adress books on the server), find the person document and retrieve the mailserver there.
Instead of a messagebox (which would result in a line in log.nsf on the server), you'd e.g. have to find an alternetive way to generate a similar message. Printing pure html back to the browser would be a option. If, however, you do not submit the message right away, but "post" the recipients to an agent using AJAX, you could use a javascript "alert()" or "window.open()" to display your message in a messagebox-like way, on top of the mail.

I have never attempted to get my code to regulate mail traffic, so I can't guard you from all obstacles. One comes to mind though: can you get hold of the recipients in the BCC field this way as well?
0
 
CRAKCommented:
What exactly are you trying to archieve?
In a web environment lotusscript can only be used in agents (e.g. WebQueryOpen). It executes on the application server. The details you're trying to obtain would be retrieved (if available) from notes.ini on the server! (i.e. not from the notes client!)

Whatever it is that you're trying to do, you will need to set this agent to run as webuser, access the public NAB, lookup the user and retrieve his/her mailserver.
On the other hand... if you're in webmail... isn't NotesSession.CurrentDatabase what you're after?
0
 
Sjef BosmanGroupware ConsultantCommented:
CRAK, please have a look at some earlier questions. Asker wants some sort of trace, for which he needs the server...
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
CRAKCommented:
So.... please join the party, Sjef!
0
 
Amitava_MukherjeeAuthor Commented:
i want to customize our send button from lotus client as well as from lotus webmail so that whenever users want to send a mail, it will check a white list group in his mail server and if all the addresses are available in white list then the mail can be send else throw a message that the address is not white listed.

for this i first want to collect user homeserver. bosman have send the the code snippet given above, and it is working fine in lotus client portion. the send button of lotus client is working fine. now i want to do that in the webmail interface also. i never used that interface for my customization. thats why i want to know if the above code snippet will work in lotus webmail portion or not.
0
 
Amitava_MukherjeeAuthor Commented:
i beg your perdon, the above code is given by "jagaduri" from expert exchange
0
 
Sjef BosmanGroupware ConsultantCommented:
There are only two good ways to do this, the not-so-difficult way and the proper way.

Not so difficult: use server mail rules, if that is possible, but I suppose it isn't
See http://www-12.lotus.com/ldd/doc/domino_notes/rnext/help6_admin.nsf/b3266a3c17f9bb7085256b870069c0a9/22b430b38b47d45f85256c1d003957d8?OpenDocument

The very bumpy way: you have to build a server extension that runs via the Extension Manager. That is the ideal way to intercept mails on a server. All anti-spam tools for Domino servers are built that way.
See http://www-12.lotus.com/ldd/doc/tools/c/7.0/api70ug.nsf/85255d56004d2bfd85255b1800631684/06fd173414dcdad9852560eb0077ca42?OpenDocument
0
 
Amitava_MukherjeeAuthor Commented:
i have to go through your solution. i am going to my new year vacation for 3 days. i will be back on 3rd jan 10. happy new year to all of you and please give me these days to close this call :D. i will try these out on 3rd jan of the new year
0
 
Sjef BosmanGroupware ConsultantCommented:
No problem, tough questions can stay open longer if you want to.

Best Wishes!
0
 
CRAKCommented:
Can you please give us an update on the status?
0
 
Amitava_MukherjeeAuthor Commented:
i am really really sorry for my delay.

actually i joined today after a long vacation. i have not found any place where the code is to be written for webmail portion. i am frantically searching some help just to know where the code is to be written for this purpose (anywhere in server or in client, i think it should be somewhere in server). i have developed the client side code a lot for lotus client with lotus script and formulla language, but for webpart this is my 1st assignment. thats why it is taking too much time to resolve.

sorry again
0
 
Amitava_MukherjeeAuthor Commented:
thanx, and sorry for the delay of closing this comment
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.