I have a LotusScript script library that formats an HTML mail document that it works fine unless the SendTo name contains an accented character. -- Edit -- Sub Initialize Dim s As New NotesSession Dim mailName As String Dim body As NotesMIMEEntity
Dim header As NotesMIMEHeader
Dim stream As NotesStream
Dim thisDB As NotesDatabase
Dim MailDoc As NotesDocument
Set thisDB = s.currentDatabase
Set mailDoc = thisDB.Createdocument()
mailName = "BØRG@WFSSystems.ca"
Set stream = s.CreateStream
s.ConvertMIME = False ' Do not convert MIME to rich text
Set body = mailDoc.CreateMIMEEntity
Set header = body.CreateHeader("To")
Call header.SetHeaderValAndParams("charset=UTF-16")
Call header.SetHeaderVal("MIME multipart message")
Call header.SetHeaderVal(mailName)
Call stream.writetext(|</body>|)
Call stream.writetext(|</html>|)
'Convert stream then send
Call body.SetContentFromText(stream, "text/HTML;charset=UTF-16", ENC_IDENTITY_7BIT)
Call mailDoc.Send(False)
s.ConvertMIME = True ' Restore conversion - very important
End Sub
Above is the whole sub that I set as a test. It looks like the accented character is maintained through the whole process and the email is actually sent. I'm working with a local copy of my mail file so I can see what ends up in mail.box. The Mail.box shows the recipient to be "BRG@WFSSystems.ca". So now I'm wondering if the issue is my code or is it my settings or preferences somewhere?