Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
en:create:functions:mailschedule [12.09.2015 14:26] – [mailSchedule()] admin | en:create:functions:mailschedule [29.08.2020 11:05] – sophia.schauer |
---|
====== mailSchedule() ====== | ====== mailSchedule() ====== |
| |
''void **mailSchedule**(string //personID//, int //mailing//, int //time//)'' | ''void **mailSchedule**(string //personID//, int //mailing//, int //time//, [array //settings//])'' |
| |
This function prepares the sending of a mailing directly in the questionnaire -- for example, the invitation to the second questionnaire. In contrast to ''[[:en:create:functions:mailresume|mailResume()]]'', the current interview will not be resumed. Instead, the mailing is sent in the same way as if it had been prepared manually. | This function prepares the sending of a mailing directly in the questionnaire -- for example, the invitation to the second questionnaire. In contrast to ''[[:en:create:functions:mailresume|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. | **Note:** The email will only be sent if the participant is already registered in the mailing list. |
| |
* //personID//\\ The personal ID of the addressee who should receive the email. If the participant began the questionnaire after receiving an invitation via mailing, you can enter ''false'' and then a suitable ID will be automatically generated. Alternatively, the personal ID can be determined using ''[[:en:create:functions:caseserial|caseSerial()]]''. | * //personID//\\ The personal ID of the addressee who should receive the email. If the participant began the questionnaire after receiving an invitation via mailing, enter ''false'' to resolve the ID automatically. |
* //mailing//\\ (Numerical) ID of the mailing which should be sent to the participant. | * //mailing//\\ (Numerical) ID of the mailing which should be sent to the participant. |
* //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. |
| * //settings//\\ Optional settings, specified as associative array with the following keys: |
| * '''status'''\\ Send reminder/follow-up emails only if the link in the original serial mail ... |
| * '''finished''' -- ...opened and the questionnaire was filled out to the end |
| * '''incomplete''' -- ...was not opened or not filled in to the end |
| * '''no-response''' -- ...was not opened |
| * '''expire'''\\ Limit the validity of the personal participation link, the same format as for the //time// |
| * '''to.email'''\\ Do not send e-mail to the e-mail address stored in the address entry, but to the e-mail address specified here. This function can be used to notify the project manager if a respondent does not complete a (follow-up) questionnaire within a defined time. |
| * '''to.mobile'''\\ Do not send SMS to the phone number (possibly) stored in the address entry, but to the phone number specified here. The phone number must be specified with country code. |
| |
**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. | **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. |