Web Feedback form not emailing

I have a form with a few fields (including a richtext field called ‘Body’ and other text fields). when the submit button is pressed by the user the information is picked up at the backend by an agent using DocumentContext. I want to be able to concatanate all the fields and email them to an email address. However I am struggling with the richtext handling. Please help!

Sub Initialize

Dim Session As New NotesSession	

Dim webPage As NotesDocument

Set webPage = Session.DocumentContext



Dim rtitem As New NotesRichTextItem( webPage, "Body" )

Set ritem = webPage.GetFirstItem("Body")

webPage.Principal = "Fred Bloggs Feedback"

webPage.Form = "Memo"

Call rtitem.AppendText("Name: "+webPage.names(0))

Call rtitem.AddNewLine( 1 )

Call rtitem.AppendText("Dept: "+webPage.depts(0))

Call rtitem.AddNewLine( 1 )

Call rtitem.AppendText("Tel: "+webPage.telephone(0))

Call rtitem.AddNewLine( 1 )

Set webPage.Body = rtitem  ****** line causing problem 

Call webPage.Send(False)

			

webPage.remove(True)

End Sub

Subject: Web Feedback form not emailing

Remove the problem line – the Body field on your webpage document is already the same thing as rtitem.

Subject: Web Feedback form not emailing

remove the following lines of code:

Set webPage.Body = rtitem

webPage.remove(True)

and add

webPage.SendTo = *** whoever u want to put here ***

Subject: Web Feedback form not emailing

I have done that and I am getting the email. However, the email does not contain the contents of the Body.

Name, Dept and Tel come through but what was in Body field is not coming through. I am trying to concatenate the contents of the Body field on the form (Richtext field) to the other fields (names, depts,tel - all text fields).