x

Main chapters

  1. LimeSurvey Cloud vs LimeSurvey CE
  2. LimeSurvey Cloud - Quick start guide
  3. LimeSurvey CE - Installation
  4. How to design a good survey (Guide)
  5. Getting started
  6. LimeSurvey configuration
  7. Introduction - Surveys
  8. View survey settings
  9. View survey menu
  10. View survey structure
  11. Introduction - Questions
  12. Introduction - Question Groups
  13. Introduction - Surveys - Management
  14. Survey toolbar options
  15. Multilingual survey
  16. Quick start guide - ExpressionScript
  17. Advanced features
  18. General FAQ
  19. Troubleshooting
  20. Workarounds
  21. License
  22. Version change log
  23. Plugins - Advanced
 Actions

BeforeTokenEmail

From LimeSurvey Manual

 Hint: This features is available starting in version 2.05 build 140404


  This feature change in 4.0.0. See beforeEmail event for the new evnt input and output and example.


Usage

This event can be used each time a token is send by the system. Token emails are of type reminder, invitation, confirm or register.

Input

The event receives the following information:

  • mailer : The mailer object (New in 4.0 ))
  • type : Email type (reminder, invitation, confirm or register (New in 2.06 ))
  • model : model used in survey_languagesettings table (remind, invite, confirm or register (New in 2.51.5 ))
  • survey : The survey id (New in 2.51.5 )
  • subject : Email subject
  • to : Recipient(s)
  • body : Email body content
  • from : Sender(s)
  • token : Raw token data in an array .


Possible output

The following information can be set in the event:

  • subject : Email subject
  • to : Recipient(s)
  • body : Email body content
  • from : Sender(s)
  • send : If true Limesurvey will send the email. Setting this to false will cause Limesurvey to assume the mail has been sent by the plugin.
  • message : If send is true and call by register : a message to be shown to the user
  • error : If set and "send" is true, log the error as failed email attempt.

Example

See also