This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
en:create:functions:mailresume [19.12.2014 23:30] – [Pause Questionnaire] alexander.ritter | en:create:functions:mailresume [29.08.2020 11:33] – sophia.schauer | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== mailResume() ====== | ====== mailResume() ====== | ||
- | '' | + | '' |
This function sends an email during the current questionnaire with a link in order to resume the questionnaire at a later point in time. This is particularly useful when combined with a specific break in multi-wave surveys ('' | This function sends an email during the current questionnaire with a link in order to resume the questionnaire at a later point in time. This is particularly useful when combined with a specific break in multi-wave surveys ('' | ||
Line 10: | Line 10: | ||
* // | * // | ||
* //time//\\ Either the delay in email delivery (in seconds: maximum 153900000) __or__ a Unix timestamp, which defines the time until the next email is sent. | * //time//\\ Either the delay in email delivery (in seconds: maximum 153900000) __or__ a Unix timestamp, which defines the time until the next email is sent. | ||
- | * //C1// to //C3// (optional)\\ If you enter text here (optional), you can use this in the mailing with the help of placeholders '' | + | * //C1// to //C5// (optional)\\ If you enter text here (optional), you can use this in the mailing with the help of placeholders '' |
===== Tips ===== | ===== Tips ===== | ||
Line 27: | Line 27: | ||
===== Pause Questionnaire ===== | ===== Pause Questionnaire ===== | ||
- | In the following example, the participant was invited to the questionnaire via a mailing. A page interruption | + | In the following example, the participant was invited to the questionnaire via a mailing. A page where the questionnaire is paused |
<code php> | <code php> | ||
Line 59: | Line 59: | ||
// Save the time | // Save the time | ||
$timeBreak1 = time(); | $timeBreak1 = time(); | ||
- | registerVariable('timeBreak1'); | + | registerVariable($timeBreak1); |
// Prepare email | // Prepare email | ||
// Send ID 2 mailing in exactly 14 days | // Send ID 2 mailing in exactly 14 days | ||
Line 91: | Line 91: | ||
mailResume(' | mailResume(' | ||
</ | </ | ||
+ | |||
+ | |||
+ | ===== Serial Mail After Opt-In Question ===== | ||
+ | |||
+ | With a question of type [[: | ||
+ | |||
+ | This section explains how to use '' | ||
+ | |||
+ | There are two mechanisms for the opt-in question: The Double-Opt-In (the respondent must first confirm the address entry via confirmation email, recommended) and the Single-Opt-In, | ||
+ | |||
+ | - With Double-Opt-In it makes sense to trigger the dispatch only after confirmation of the mail address. How this works is explained in the following chapter: [[:/ | ||
+ | - If you want to send the serial mail directly, you can use the confirmation mail of the (double-)opt-in question as invitation mail for a questionnaire at the same time (//Further settings// -> // | ||
+ | - If a " | ||
+ | |||
+ | The PHP code with the '' | ||
+ | |||
+ | In the following example, the opt-in question on page 9 would have the ID " | ||
+ | |||
+ | <code php> | ||
+ | mailSchedule(value(' | ||
+ | </ | ||
+ | |||
+ | The following PHP code would send the serial mail with the ID 3 after 14 days: | ||
+ | |||
+ | <code php> | ||
+ | mailSchedule(value(' | ||
+ | </ | ||
+ | |||
+ | Of course you can also prepare several serial mails: | ||
+ | |||
+ | <code php> | ||
+ | mailSchedule(value(' | ||
+ | mailSchedule(value(' | ||
+ | mailSchedule(value(' | ||
+ | </ | ||
+ | |||
+ | If there is a possibility that the respondent does not enter an e-mail address, an '' | ||
+ | |||
+ | <code php> | ||
+ | $serial = value(' | ||
+ | if ($serial) { | ||
+ | mailSchedule($serial, | ||
+ | mailSchedule($serial, | ||
+ | mailSchedule($serial, | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | Note that the personal ID (SERIAL) here is cached in a PHP variable ('' |