Actions

BeforeSurveyEmail: Difference between revisions

From LimeSurvey Manual

(Page creation with current input and output)
 
No edit summary
Line 1: Line 1:
{{FeatureStarting|4.0.0}}  
{{FeatureStarting|4.0.0}}  
{{Alert|This feature is currently implemented in beta version of LimeSurvey.}}


'''Usage'''
'''Usage'''
Line 18: Line 15:
* from : Sender (From)
* from : Sender (From)
* bounce : The Sender (Return-Path)
* bounce : The Sender (Return-Path)
* survey : null
* survey : the survey id (integer)
* model : null
* model : invitation, reminder or type
* updateDisable : array
* updateDisable : array



Revision as of 08:39, 4 February 2020

 Hint: This features is available starting in version 4.0.0


Usage

This event can be used each time an email related to a survey and not related to a token is send

Input

The event receives the following information:

  • mailer : The mailer object
  • type : Email type : 'admin_notification', 'admin_detailed_notification', 'savesurveydetails','errorsavingresults' . default is unknow, and deprecated usage of function is 'deprecated'
  • subject : Email subject
  • to : Recipient(s) with format [email,name]
  • body : Email body content
  • from : Sender (From)
  • bounce : The Sender (Return-Path)
  • survey : the survey id (integer)
  • model : invitation, reminder or type
  • updateDisable : array

Possible output

The following information can be set in the event:

  • updateDisable : if plugin use mailer to update other parts, allow to disable update by default action
  • subject : Email subject
  • body : Email body content
  • to : Recipient(s) in [[email,name]] format
  • from : From email and name
  • bounce : Return-Path
  • 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 action return a message : the message to be shown
  • error : If set and "send" is true, log the error as failed email attempt.

Example