Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
en:create:functions:mailschedule [26.09.2020 13:57] – [mailSchedule()] sophia.schaueren:create:functions:mailschedule [26.09.2020 14:03] sophia.schauer
Line 24: Line 24:
 **Tip:** There are numerous websites on the internet that can covert a date into a Unix timestamp. For example: [[http://www.unixtime.de/|unixtime.de]]. The PHP [[http://www.php.net/manual/en/ref.datetime.php|Date/Time Functions]] (in particular ''[[http://php.net/manual/en/function.mktime.php|mktime()]]'' and ''[[http://www.php.net/manual/en/function.strtotime.php|strtotime()]]'') are ideally suited to this purpose.  **Tip:** There are numerous websites on the internet that can covert a date into a Unix timestamp. For example: [[http://www.unixtime.de/|unixtime.de]]. The PHP [[http://www.php.net/manual/en/ref.datetime.php|Date/Time Functions]] (in particular ''[[http://php.net/manual/en/function.mktime.php|mktime()]]'' and ''[[http://www.php.net/manual/en/function.strtotime.php|strtotime()]]'') are ideally suited to this purpose. 
  
-===== Example =====+===== Invitation to Follow-Up Survey =====
  
 A participant was invited to take part in the questionnaire via a mailing. 14 days after he clicked on the link, and thus accessed the questionnaire, he should receive an invitation to the second questionnaire (mailing no. 2) A participant was invited to take part in the questionnaire via a mailing. 14 days after he clicked on the link, and thus accessed the questionnaire, he should receive an invitation to the second questionnaire (mailing no. 2)
Line 48: Line 48:
 <code php> <code php>
 mailSchedule(false, 2, strtotime('+1 month')); mailSchedule(false, 2, strtotime('+1 month'));
-mailSchedule(false, 3, strtotime('+1 month +1 week'), array(+mailSchedule(false, 3, strtotime('+1 month +1 week'), [
   'status' => 'no-response'   'status' => 'no-response'
-));+]);
 </code> </code>
 +
 +
 +===== Custom Fields =====
 +
 +The following command sends the serial mail with the ID 2 on the next Monday at 8 o'clock to the person, who just completes the questionnaire. Instead of the placeholder ''%custom1%'' the serial mail shows the date when ''mailSchedule()'' was called.
 +
 +<code php>
 +mailSchedule(false, 2, strtotime('next Monday 08:00:00'), [
 +  '%custom1%' => date('d.m.Y')
 +])
 +</code>
 +
en/create/functions/mailschedule.txt · Last modified: 09.03.2022 21:59 by admin
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki