Hi All,I am sending the mail (rich text format) thorugh the notes client to the same user but at his two different id on the different servers, e.g one at “abcd@xxxx” and another at “wxyz@xxxx.com”.
At one id he is getting the mail in expected format(i.e. Rich Text Format) and on another as an unexpected fromat(Plain Text).
Plz share what may be the reason for that.The code written is as follows.
Sub Click(Source As Button)
' This routine sends an email message
Dim session As New notessession
Dim w As New notesuiworkspace
Dim uidoc As notesuidocument
Dim doc As notesdocument
Dim db As notesdatabase
Dim EmailId As String
Dim rtitem2 As Variant
Dim rtitem3 As Variant
Set uidoc = w.currentdocument
Set doc = uidoc.document
If ( doc.IsNewNote ) Then
Call doc.Save( True, False )
Call uidoc.Refresh( True )
End If
Set db = session.CurrentDatabase
EmailId = uidoc.FieldGetText("EmailTo")
'Check before proceeding
If EmailId = "" Then
Messagebox "TO field must contain valid ids to send Email"
Else
If (Messagebox("Ok to send?", MB_OKCANCEL + MB_ICONQUESTION, "Sending Email")) = IDOK Then
'Create mail message
Set newdoc = New notesdocument(db)
Set rtitem = New NotesRichTextItem(newdoc , "Body")
Set rtitem2 = doc.GetFirstItem( "ApprovalEmail" )
Set rtitem3 = doc.GetFirstItem( "AnotherRequest" )
newdoc.Subject = uidoc.FieldGetText("Apps") + " Install - " + uidoc.FieldGetText("Date1")
newdoc.Sendto = doc.EmailTo
newdoc.CopyTo = doc.CCTo
Call rtitem.AppendText( doc.EmailText(0) )
Call rtitem.AddNewLine( 2 )
Call rtitem.AppendText( "************* Approval Email(s) ************************")
Call rtitem.AddNewLine( 1 )
Call rtitem.AppendRTItem ( rtitem2 )
Call rtitem.AddNewLine( 2 )
Call rtitem.AppendText( "************* Another Request ************************")
Call rtitem.AddNewLine( 1 )
Call rtitem.AppendRTItem ( rtitem3 )
Call newdoc.Send(False)
End If
End If
End Sub