Actions

Difference between revisions of "BeforeTokenEmail"

From LimeSurvey Manual

(Just add a warning about 4.0)
Line 1: Line 1:
 
{{FeatureStarting|2.05 build 140404}}  
 
{{FeatureStarting|2.05 build 140404}}  
  
{{Alert|This feature change in 4.0.0 in beta version}}
+
{{Alert|This feature change in 4.0.0}}
  
 
'''Usage'''
 
'''Usage'''

Revision as of 08:40, 4 February 2020

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


Important.png
  This feature change in 4.0.0

Usage

This event can be used each time a token is send by the admin user via the Limesurvey admin panel.

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