MIME and server configuration

I have a problem with Mime message that is driving me mad :

I have an agent that send an HTML mail from a Notes Client to both notes client and external client.

It is Ok for external client but with Notes clients, the result in the “from” and “sendto” fields are differents according to the server on wich the mail database is. For example, If send a mail to :

Stéphane MARTIN//EXTERIEURS/SNI

the sendto field will be St0xL182zphane_MARTIN/EXTERIEURS/SNI%SNI on Server1 and Stéphane MARTIN/EXTERIEURS/SNI on server2

and the from field will be : lbecker@domain.com for the server 1 and Laurent BECKER/MONTPELLIER/SNI for the server 2

I have compared the server documents, global domain documents, configuration documents and notes.ini of the two servers : everything is the same (these are clustered servers)

I have made a try by moving a database from the server1 to the server2 and then the result was OK. I have noticed some differences between mail arriving on server 1 and server 2 :

on server 1 : mail do NOT have INetFrom and InetSendTO fields but have OriginalFrom and OriginalTo fields

on server 2 : no OriginalFrom and OriginalTo fields but INetFrom and InetSendTO fields exists.

Here is the source code of my agent (this is a fonction, so there is only the code for sending the mail):

Dim lstrDestPour() As String

Dim lstrDestCc() As String

Dim lstrDestCcc() As String

Dim ndDialogue As NotesDocument	

Dim ns As NotesSession	



Dim ServeurESH As String

Dim ServeurSCIC As String

Dim ServeurSNI As String





Dim body As NotesMIMEEntity

Dim stream As NotesStream

Dim MsgBody As String

Dim image As String





'nddialogue is a dialog box with a sendto field where we type the recipients of the mail



Forall Dest In ndDialogue.SendTo

Set nName = New NotesName (Dest)

Redim Preserve lstrDestPour(i) As String

lstrDestPour(i) = nName.Abbreviated

i = i+1

End Forall







Set stream = ns.CreateStream

ns.ConvertMIME = False ' Do not convert MIME to rich text

Dim ndMemo As New NotesDocument ( curDb)



ndMemo.Form = "Memo"

ndMemo.SendTo=lstrDestPour

ndMemo.Subject=Sujet



image = "http://" + ServeurSNI + "/icons/doclink.gif" 





URLSNI =  "notes://" + ServeurSNI + "/" + chemin + "/0/" + docCourant.DocID(0) +"?opendocument"

URLESH = "http://" + ServeurESH + "/" + chemin +"/0/" + docCourant.DocID(0) +"?opendocument"

URLSCIC = "http://" + ServeurSCIC + "/" + chemin +"/0/" + docCourant.DocID(0) +"?opendocument"



MsgBody = |<font face=Verdana size=2>|



If ndDialogue.Comment(0) <>"" Then

	MsgBody = MsgBody & ndDialogue.Comment(0) &  |<br><br>|		

End If



Msgbody = MsgBody  &  "Pour accéder au document " &  |<br><br>|

Msgbody = MsgBody  &  "1/ Si vous êtes personnel SNI => "

Msgbody = MsgBody  &  	|<a href="| & URLSNI & |"><b><img src ="| & image  & |" border=0></a></b><br><br>|





Msgbody = MsgBody  & "2/ Si vous êtes situé dans une ESH de province  => "

Msgbody = MsgBody  &  	|<a href="| & URLESH & |"><b>| & "Accès au document" & |</a></b><br><br>|



Msgbody = MsgBody  & "3/ Si vous êtes situé à SCIC Habitat Ile de France => "

Msgbody = MsgBody  & 	|<a href="| & URLSCIC & |"><b>| & "Accès au document" & |</a></b>|



Set body = ndMemo.CreateMIMEEntity



Call stream.WriteText( MsgBody )

Call body.SetContentFromText(stream,"text/html;charset=ISO-8859-1",ENC_NONE) 



stream.Close



Call ndMemo.Send( False )			

ns.ConvertMIME = True