Hi All,
I’ve written an agent in lotusscript that sends mail.
Aim: send the appropriate confirmation email to the subscriber. Confirmation mail can be in different languages like dutch, french, english, german.
My problem is whenever my agent sends french or german confirmation mail to a yahoo or hotmail emailaddress, characters like é, ö are shown wrongly.
How can I adapt my agent that it sends it in a right way?
Thanks,
This is my agent.
Sub Initialize
Dim s As New notessession
Dim view As notesview
Dim doc As notesdocument
Dim maildoc As notesdocument
Dim item As notesrichtextitem
Dim rtitem As notesrichtextitem
Dim searchID As Variant
Dim db As NotesDatabase
Dim t As NotesSession
Dim view2 As NotesView
Dim doc2 As NotesDocument
Dim db2 As NotesDatabase
Dim memo As NotesDocument
Set db =s.currentdatabase
Set view=db.getview("Events and Registrations")
Set doc= view.getfirstdocument
While Not doc Is Nothing
' **************** Check if the registred person did receive a mail.
If (doc.txtEmailsent(0) = "NO") Then
searchID = doc.confirmation(0)
' ************** Look for the appropriate confirmation document by the DocumentID
Set t = New NotesSession
Set db2 = t.CurrentDatabase
Set view2 = db2.getview("Confirmation")
Set doc2= view2.GetDocumentByKey(searchID)
Set item = doc2.GetFirstItem( "Mail" )
Set memo = New NotesDocument( db )
memo.principal=doc2.Sentby(0)+" "
memo.From= memo.principal(0)
memo.replyto=memo.principal(0)
memo.Form = "Memo"
memo.Subject = doc2.ConfirmationTitle(0)
Call memo.CopyItem( item, "Body" )
Call doc.ReplaceItemValue("txtEmailsent","YES")
Call doc.Save(True,True)
Call memo.Send( True, doc.email(0) )
End If
Set doc=view.getnextdocument(doc)
Wend
End Sub