Function: diary-mail-entries

Send a mail message showing diary entries for next NDAYS days.
If no prefix argument is given, NDAYS is set to `diary-mail-days'.
Mail is sent to the address specified by `diary-mail-addr'.

Here is an example of a script to call `diary-mail-entries',
suitable for regular scheduling using cron (or at). Note that
since `emacs -script' does not load your init file, you should
ensure that all relevant variables are set.

#!/usr/bin/emacs -script
;; diary-rem.el - run the Emacs diary-reminder

(setq diary-mail-days 3
diary-file "/path/to/diary.file"
calendar-date-style 'european
diary-mail-addr "")

(diary-mail-entries) # diary-rem.el ends here (fn &optional NDAYS)