Lotus Notes to Outlook - blank email

The below agent creates an email and sends to the users defined. The emails are delivered but with no body when is sent to Outlook. I have no problem when its send to a Lotus Notes email account.

Sub Initialize

Dim s As New NotesSession

Dim db As NotesDatabase       

Dim view As notesview

Dim xExpLogon As String, xExpDate As String, xExpACF2 As String, xExpExec As String, xExpRule As String

Dim xExpRead As String, xExpWrite As String, xExpAlloc As String

Dim xExpRead1 As String, xExpExec1 As String, xmailtext As String     

Dim xExpDataset As String, xrights As String, xnotesname As String

Dim xSendTo As String     

Dim doc As notesdocument

Dim doc1 As notesdocument

Dim checkdoc As notesdocument     

Dim xdatexpt As String

xdatexpt = Today()

Dim temp As String



Set s= New notessession 

Set db = s.currentdatabase

Set view = db.getview( "LookupEmpNew" )     



Set doc=view.GetFirstDocument     



While Not doc Is Nothing

	xnotesname = doc.GetItemValue("notesname")(0) 

	xmailtext = doc.GetItemValue("mailtext")(0) 

	xExpLogon = doc.GetItemValue("ExpLogon")(0) 

	xSendTo = doc.GetItemValue("ExpLogon")(0)  

	xExpDate=doc.GetItemValue("ExpDate")(0)

	xExpACF2 = doc.GetItemValue("ExpACF2")(0)

	xExpDataset = doc.GetItemValue("ExpDataset")(0)          

	xExpRule= doc.GetItemValue("ExpRule")(0)   

	xExpRead = doc.GetItemValue("ExpRead")(0)

	xExpWrite = doc.GetItemValue("ExpWrite")(0)

	xExpAlloc = doc.GetItemValue("ExpAlloc")(0)

	xExpExec = doc.GetItemValue("ExpExec")(0)

	xrights = doc.getitemvalue("rights")(0)

	Dim item As NotesItem     

	

	Set doc1 = db.createdocument                

	doc1.form = "ExpireMemo"          

	doc1.rights = xrights

	doc1.mailtext = xmailtext

	doc1.notesname = xnotesname

	doc1.ExpLogon = xExpLogon

	doc1.ExpDate = xExpDate

	doc1.ExpACF2 = xExpACF2

	doc1.ExpRule = xExpRule          

	doc1.ExpDataset = xExpDataset               

	doc1.dateexpt = xdateexpt

	doc1.SendTo = xSendTo

	doc1.Subject = "Production Access Expiration"

	doc1.Principal = "Information Security"

	Call doc1.Save(False, True) 		

	On Error 4294 Goto sendToMe

	If xnotesname <> notesname Then			

		Call doc1.Send(True,xnotesname)

	Else

		doc1.SendTo = "aa72127"

		doc1.Subject = "Production Access Expiration Not Deliverable to " + xExpLogon

		Call doc1.Send(True)

	End If

	

	Set doc = view.GetNextDocument(doc)

Wend          

Exit Sub

sendToMe:

doc1.SendTo = "aa72127"

doc1.Subject = "Production Access Expiration Not Deliverable to " + xnotesname

Call doc1.Send(True)

Resume Next

End Sub

Subject: Lotus Notes to Outlook - blank email

Hi,

Right off hand, I do not see where any data is assigned to doc1.Body. You may also want to use some thing like:

Dim rtitem As Variant

Set rtitem = doc1.GetFirstItem( “Body” )

If rtitem.Type = RICHTEXT Then

Call rtitem.AddNewLine( 1 )

Call rtitem.AppendText( “”+xmailtext+“” )

End If

HTH

Geoff-

Subject: RE: Lotus Notes to Outlook - blank email

I agree with Geoff - and I’ll add an little more explanation -

The Lotus Notes users are able to see the data, because they’re able to see the “ExpireMemo” form that you used when you created the document.

However, the form isn’t sent to Outlook users; and you’re not writing data to the standard fields used to send internet mail.

Writing the ‘Body’ field is critical.

Subject: RE: Lotus Notes to Outlook - blank email

Thanks to both. This is my first web application and has been a headache.