BeforeTokenEmail: Difference between revisions
From LimeSurvey Manual
DenisChenu (talk | contribs) Created page with "{{FeatureStarting|2.06}} '''When''' Each time a token is send my admin user with the admin panel. '''Input''' The event receives the following information: * type : Email..." |
m Fixed "Usage" description, because not all token emails are sent by the admin user in the admin panel |
||
(11 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{FeatureStarting|2. | {{FeatureStarting|2.05 build 140404}} | ||
{{Alert|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''' | '''Input''' | ||
The event receives the following information: | The event receives the following information: | ||
* type : Email type | * mailer : The mailer object {{NewIn|v=4.0}}) | ||
* subject : | * type : Email type (reminder, invitation, confirm or register {{NewIn|v=2.06}}) | ||
* to : Recipient(s) | * model : model used in survey_languagesettings table (remind, invite, confirm or register {{NewIn|v=2.51.5}}) | ||
* survey : The survey id {{NewIn|v=2.51.5}} | |||
* subject : Email subject | |||
* to : Recipient(s) | |||
* body : Email body content | * body : Email body content | ||
* from : Sender(s) | * from : Sender(s) | ||
* token : Raw token data | * token : Raw token data in an array . | ||
Line 19: | Line 24: | ||
The following information can be set in the event: | The following information can be set in the event: | ||
* subject : | * subject : Email subject | ||
* to : Recipient(s) | * to : Recipient(s) | ||
* body : Email body content | * body : Email body content | ||
* from : Sender(s) | * from : Sender(s) | ||
* send : If true | * 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. | * error : If set and "send" is true, log the error as failed email attempt. | ||
'''Example''' | |||
* [https://gitlab.com/SondagesPro/mailing/noMailToExample noMailToExample] | |||
'''See also''' | |||
* [[beforeEmail]] | |||
* [[beforeSurveyEmail]] | |||
[[Category:Plugins events]] | [[Category:Plugins events]] |
Latest revision as of 10:55, 14 January 2022

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