This is an old revision of the document!
void mailSchedule(string personID, int mailing, int time)
Thus function prepares the sending of a mailing directly in the questionnaire – for example, the invitation to the second questionnaire. In contrast to mailResume()
, the current interview will not be resumed. Instead, the mailing is sent in the same way as if it had been prepared manually.
Note: The email will only be sent if the participant is already registered in the mailing list.
false
and then a suitable ID will be automatically generated. Alternatively, the personal ID can be determined using caseSerial()
.
Note: A mailing is sent (in contrast to mailResume()
) only once per recipient, even if the function is called up repeatedly. Sending different mailings is possible – e.g. an invitation to take part in the second wave of the survey in 14 days and a further invitation to the third wave in 1 month.
Tip:
Tipp: Im Internet gibt es zahlreiche Websites, die ein Datum in einen Unix-Zeitstempel umrechnen können, z.B. unixtime.de. Auch die Datums- und Zeit-Funktionen von PHP (insbesondere mktime()
und strtotime()
) sind dafür hervorragend geeignet.
Ein Teilnehmer wurde per Serienmail zum Fragebogen eingeladen. 14 Tage, nachdem er auf den Link geklickt und damit den Fragebogen aufgerufen hat, soll er eine Einladung zum zweiten Fragebogen erhalten (Serienmail Nr. 2).
mailSchedule(false, 2, strtotime('+14 days'));
Anstatt die Funktion strtotime()
zu bemühen, kann das Zeitinterval auch in Sekunden spezifiziert werden: 14 Tage = 336 Stunden = 1209600 Sekunden.
mailSchedule(false, 2, 1209600);