July 27, 2007

About mail.box

Sometimes it is desirable to put mail messages directly into the mail box on the server. If the server has one mail box it is called mail.box. But as you might know it is possible to create several mail boxes to increase performance if lots of mail are running through the system. Be cautious here though, 18 mail boxes is not a good alternative but 2, 3 or 4 might really help. Anyway, when telling the server to create several mail boxes the database mail.box will disappear and instead new mail boxes will be created called mail1.box, mail2.box and so on.

Now, if your application wants to create a mail in mail.box based on some form you probably would like to hard code the name of the database, that is mail.box. But what if the server has several mail boxes? No worries, don't change a thing. You still type mail.box and the server/router will put the mail in the mail box which is mostly available at the time.

It might be good to know that this is not supported officially though.

Here's where you change how many mail boxes to use. The command "Tell Router Update Config" should make the changes take effect immediately or you could just wait 5 minutes.



And here's a code strip as an example of how to put mail directly in mail.box.

Dim session As New NotesSession
Dim workspace As New NotesUIWorkspace
Dim db As NotesDatabase
Dim serverName As String
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim rtitemA As NotesRichTextItem
Dim rtitemB As NotesRichTextItem

Set db = session.CurrentDatabase
Set uidoc = workspace.CurrentDocument

serverName = db.Server
Dim mailBoxDb As New NotesDatabase(serverName, "mail.box")
Dim mailDoc As NotesDocument
Set doc = uidoc.Document

Set mailDoc = New NotesDocument(mailBoxDb)
Call mailDoc.AppendItemValue("Form", "Memo")
Call mailDoc.AppendItemValue("From", uidoc.FieldGetText("From"))
Call mailDoc.AppendItemValue("SendFrom", uidoc.FieldGetText("From"))
Call mailDoc.AppendItemValue("Principal", uidoc.FieldGetText("Principal"))
Call mailDoc.AppendItemValue("SendTo", uidoc.FieldGetText("SendTo"))
Call mailDoc.AppendItemValue("Recipients", uidoc.FieldGetText("SendTo"))
Call mailDoc.AppendItemValue("ReplyTo", uidoc.FieldGetText("ReplyTo"))'
Call mailDoc.AppendItemValue("Subject", uidoc.FieldGetText("Subject"))

Set rtitemA = New notesrichtextitem(mailDoc, "Body")
Set rtitemB = doc.GetFirstItem("messageBody")

Call rtitemA.AddNewline(1)
Call rtItemA.AppendRTItem(rtitemB)

Call mailDoc.Save(True, False)



Technorati tags:
, ,


July 09, 2007

Good reading today

Web developer links:

And some other useful and interesting stuff:
Technorati tags:
, ,


July 01, 2007

Ekakans office in SL is getting its first shapes

I have started to build an office for Ekakan in Second Life and well... you have to start somewhere ;-)
Here's what it looks like at this very moment. I/we have great plans, ideas and thoughts for this. Although Ekakan doesn't yet have it's own place in SL, it will soon be for real and I'll let you know when that happens.

The idea is to be visible, to show the company and its competence in yet another medium. Maybe to be able to talk to the consultants the avatar way, read curriculum vitaes (resumes) and hire consultants. There are also plans to offer different types of tips and tricks and to be able to assist in different ways. The place to go to when you need to kill twenty minutes or help with techie questions and issues.

Come to the IBM Sandbox and I will give you the grand tour ;-) (if I'm currently there).


View from outside


Inside the office. Photos of some of the employees on the wall which show short presentations when touched.


There's also a window to lighten up the place and coloured sofas.



Technorati tags:
,