Automated send of form
Posted on 2004-04-07
Need some help creating an automated mailer based on date. I have the code below to send a basic @mailsend notice but I know it is possible in LS to do the same but have it send a custom form and not just a mailer. I have the code I have used in the past to manually send a form but I want this to go at x number of days out. I guess I want to merge these two methods.
SendTo := "user";
CopyTo := "";
Subject := "Subject";
Remark := "remark";
daysleft:= (start - today)/(60 * 60 * 24);SELECT
@If (daysleft = 30 & Form = "enb survey";@MailSend(sendTo;copyTo;"";Subject ; Remark ; "" ; [IncludeDoclink]); "")
Manual Send of form
Sub Click(Source As Button)
Dim workspace As New NotesUIWorkspace
Dim session As New NotesSession
Dim db As NotesDatabase
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim emaildoc As NotesDocument
Dim Item As NotesItem
Dim twoliner As String
Set db = session.CurrentDatabase
Set uidoc = workspace.CurrentDocument
Set doc = uidoc.Document
Set emaildoc = db.CreateDocument
emaildoc.form = "enb T-15 Reminder"
emaildoc.sendto = doc.entered_by(0)
emaildoc.Subject = "Second Notice - Important Request to complete eNewBusiness Attendance Sheet"
twoLiner = |T-15 Reminder sent to participant. |
Messagebox twoLiner, MB_OK, "Send Confirmation "