Activation de messages planifiés à l'aide d'un programme

Utilisez l'élément Date/heure du récapitulatif $SendAt pour activer la messagerie planifiée.

Pourquoi et quand exécuter cette tâche

Exemple : Planification de formule de bouton
_def := @If(@IsAvailable($SendAt); $SendAt; @Now);
_newValue := @Prompt([OkCancelEdit]; "Schedule delivery"; 
"Enter date and time this message should be sent"; @Text(_def));
REM {If user cancels, execution stops.};
_newValue := @TextToTime(_newValue);
_valid := @If(!@IsTime(_newValue); @False; @Text(@Time(_newValue)) 
!= "" & @Text(@Date(_newValue)) != "");
@If(!_valid; @Prompt([Ok]; "Schedule delivery"; 
"Please supply a date and time."); _newValue > @Now; 
FIELD $SendAt := _newValue; FIELD $SendAt := @DeleteField);
Exemple : API
Le nom de l'élément est disponible en tant que #define dans le SDK de stdnames.h
#define MAIL_SENDAFTER_ITEM "$SendAt" 
/* Scheduled mail date and time specified  */
Exemple : LotusScript®
%REM
	Sub SendDelayedNotice
	Description: Send a specified user an email scheduled for 
       delivery at 8AM tomorrow morning, with a reminder
       to review a specified document at that time.
	Arguments:
		recipient: email address of recipient.
		linkDoc: the document they are to review.
%END REM
Sub SendDelayedNotice(ByVal recipient As String, linkDoc As NotesDocument)
	Dim ses As New NotesSession, db As NotesDatabase, 
           memo As NotesDocument, body As NotesRichTextItem
	Dim sendTime As Variant
	Set db = ses.CurrentDatabase
	Set memo = db.CreateDocument
	Call memo.ReplaceItemValue("Form", "Memo")
	Call memo.ReplaceItemValue("Subject", "Document review reminder")
	sendTime = Today + (4./3.) ' 8am tomorrow morning (in the current TZ)
	Call memo.ReplaceItemValue("$SendAt", sendTime)
	Set body = memo.CreateRichTextItem("Body")
	Call body.Appendtext("Good morning! It's time to review this document: ")
	Call body.Appenddoclink(linkDoc, "", "")
	body.Update
	Call memo.Send(False, recipient)
End Sub