I am working on an auto notification database which queries my time tracking database and makes sure associates enter 8 yours a day into the time tracking database.
I have the auto notification database working but all e-mails are sent from my Lotus Notes account meaning when a user recieves an auto notify message it is from me. What I would like to occur is have the message be from their manager.
In the database I have all the user's Lotus Notes passwords, server names and .nsf files. This is all I needed to send an e-mail using my information.
My question is, can I initiate the sending of an e-mail using someone else's Lotus Notes information. Example, if Bill did not enter his time and Bill's manager is Jim, I would like a reminder auto notification e-mail to come from Jim (Bill's manager), not me.
Here is the code I have. Any help would be greatly appreciated.
Dim session As NotesSession
Dim MailDb As NotesDatabase
Dim MailDoc As NotesDocument
Set session = CreateObject("Lotus.NotesSession")
Call session.Initialize("My Lotus Notes Password")
Set MailDb = session.GetDatabase(ServerName, MailFile.nsf)
If MailDb.IsOpen = True Then
'Already open for mail<br/>
Else
Call MailDb.Open<br/>
End If
Set MailDoc = MailDb.CreateDocument
Call MailDoc.ReplaceItemValue("SendTo", SendTo)
Call MailDoc.ReplaceItemValue("BlindCopyTo", "My e-mail address")
Call MailDoc.ReplaceItemValue("Subject", "Time Tracking Notification for " & Date - checkDaysBackAmount & " to " & Date)
Call MailDoc.ReplaceItemValue("Body", Body of Message)
MailDoc.SaveMessageOnSend = True
Call MailDoc.Send(False)
Set MailDb = Nothing
Set MailDoc = Nothing
Set session = Nothing
Thanks
Darren