I have this code to send an e-mail out monthly - it is working, however I have the “From” field set to come from “Kristy Kline” and it is not - it is coming “From” me since I saved the message. Any ideas how to get this to come from Kristy?
Sub Initialize
Dim session As New Notessession
Dim db As NotesDatabase
Dim collection As NotesDocumentCollection
Dim doc As NotesDocument
Dim maildoc As NotesDocument
Set db=session.currentdatabase
Set view=Db.getview("PattyOverdueNoBackup")
Set doc=view.getfirstdocument
If doc Is Nothing Then Error 1000, _
"Doc not found in view."
Dim sendto As String
view.AutoUpdate = False
Set doc = view.GetFirstDocument
While Not (doc Is Nothing)
Set nextdoc = view.GetNextDocument(doc)
sendto = doc.creator(0)
If sendto <> "" Then
Set maildoc=db.createdocument
maildoc.form="Memo"
maildoc.from="Kristy Kline"
maildoc.subject="Solicitation Back-up has not been received"
maildoc.body="We still have not received back-up (proposal, letter, documentation, etc.) for the " + doc.Prospect(0) +_
" solicitation request you submitted through Lotus Notes on " + Cstr(doc.SubmitDate(0)) + ". Please mail back-up to " +_
"Kristy Kline (12B Old Main), or send as an attachment via e-mail (klk31@psu.edu), or fax to 814-865-2965 at your earliest convenience. " +_
"If you have any questions, please call Kristy at 814-863-4302." + Chr(13) + Chr(13) +_
"If you feel you have received this message in error, please forward this message onto Patty Bennett (pyb2@psu.edu) " +_
"for her to review why you did receive it." + Chr(13) + Chr(13) +_
"Thank you."
maildoc.sendto=sendto
success=maildoc.ComputeWithForm(False,False)
If success Then
Call maildoc.Send(False)
End If
End If
Call doc.Save(True, True)
Set doc=nextdoc
Wend
End Sub