Send Email with Flowscript

Compatibility:IdSurvey 6IdSurvey 7
X

With IdSurvey 7 you can send an email in any part of the questionnaire.

Note

  • In order to do that you have to be sure that you verified your email domain in the EmailSender and that you have Email licenses available.

With FlowScript you can add an instruction to send an email in any part of the questionnaire.

In order to do that, you will have to write a FlowScript with the following structure.

sendMail (from, to, subject, text);

For example:

{email_result}=sendMail(‘noreply@idweb.it’, {email}, ‘Mail Subject’, ‘You completed the survey!’);

The variable {email_result} will include the result of the action.

In order to add a FlowScript click on the settings of the page and enable the switch “FlowScript”.

The FlowScript will be processed during the saving of the page.

Notes

  • Possible apostrophe contained in the email has to be written as /’
  • You can use contact fields in the Email or use the email address saved in “Email” for the recipient (as “to”).

Example

I want to send an Email to the respondent once he completes the survey:

 {email_result}=sendMail('noreply@idweb.it','{Email}', 'You completed the survey!', 'Dear {Nome}, you completed the survey!');