forked from julmud/phpDVDProfiler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
emailmessageconfig.php
70 lines (54 loc) · 2.78 KB
/
emailmessageconfig.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?php
// This file needs to define $LOAN_REMINDER_FROM as the address that you want the email
// to come from. Replies will also go to this address.
//$LOAN_REMINDER_FROM = "[email protected]";
// This file also needs to define the messages that will be sent to the borrowers. If you want
// only one message sent until the DVD is returned, then define only $message[1]. If you want
// a series of different messages sent until the return, then define more messages as
// $message[1], $message[2], $message[3], etc. The program sends $message[1], next it sends
// $message[2], etc. until it reaches the end, and then it continues to send the last message.
//
// The same thing applies to the subjects of the sent messages, using $subject[1], etc. The number
// of different subjects need not match the number of different messages.
//
// The messages and subjects may use some special variables to allow personalisation:
// $LOAN_TO - The borrower's name (from DVDProfiler)
// $LOAN_TITLE - The title of the borrowed DVD
// $LOAN_QUOTED_TITLE - The title of the DVD in quotes
// $LOAN_DATE_BORROWED - The date the DVD was borrowed (from DVDProfiler)
// $LOAN_DATE_DUE - The date the DVD was due to be returned (from DVDProfiler)
// $LOAN_GRACE - The grace period before any email reminders are sent (in days)
// $LOAN_WARNING_INTERVAL - The frequency with which email warnings are sent (in days)
// $LOAN_REMINDER_TO - The email address where the reminder is being sent (from DVDProfiler)
// $LOAN_WARNING_NUMBER - The number of the current warning (is the message number to be sent)
// $NOW - The current date
$subject[1] = "You borrowed $LOAN_QUOTED_TITLE on $LOAN_DATE_BORROWED";
if ($LOAN_GRACE == 0) {
$message[1] = <<<EOT
Hi $LOAN_TO,
You've had $LOAN_QUOTED_TITLE since $LOAN_DATE_BORROWED. It was due back on $LOAN_DATE_DUE. It'd be great to get it back. I'll send another note in $LOAN_WARNING_INTERVAL days.
Cheers!
Fred
EOT;
}
else {
$message[1] = <<<EOT
Hi $LOAN_TO,
You've had $LOAN_QUOTED_TITLE since $LOAN_DATE_BORROWED. It was due back on $LOAN_DATE_DUE. I thought I'd wait $LOAN_GRACE days before mentioning it. It'd be great to get it back. I'll send another note in $LOAN_WARNING_INTERVAL days.
Cheers!
Fred
EOT;
}
$message[2] = <<<EOT
Good Day,
You've had $LOAN_QUOTED_TITLE since $LOAN_DATE_BORROWED. It was due back on $LOAN_DATE_DUE and it's now $NOW. It'd _really_ be great to get it back. Soon, please. I'll send another note in $LOAN_WARNING_INTERVAL days in case you missed my point.
Cheers!
Fred
EOT;
$message[3] = <<<EOT
Hey Butt-Nugget,
You've had $LOAN_QUOTED_TITLE since $LOAN_DATE_BORROWED. You said you'd return it by $LOAN_DATE_DUE and it's now $NOW!!! I'm sending over Guido and Nunzio, the broken-nose twins to extract the DVD from your miserable carcass!!!
Have a great day
Fred
EOT;
?>