View Issue Details

IDProjectCategoryView StatusLast Update
10892Feature requests[All Projects] Expression Managerpublic2019-03-27 14:38
ReporterMaziAssigned To 
PrioritynoneSeverityfeature 
Status newResolutionreopened 
Product Version3.0 
Target Version3.0Fixed in Version 
Summary10892: Support EM placeholders for file names when attaching files to emails
Description

The feature to attach files to (confirmation) emails is great. It would be perfect if we could even use placeholders like {SAVEDID} or {SID} within the file names.

Additional Information

A typical use case is a chart file (img) created at survey runtime and using the current data set ID (maybe + SID) within the file name, example "chart_assessment_123456_user_21.png".

TagsNo tags attached.

Relationships

related to 09668 resolvedDenisChenu attachment in beforeTokenEmail 
related to 10533 resolvedDenisChenu Global beforeSendEmail event 

Activities

sammousa

sammousa

2016-04-08 12:37

reporter   ~37133

The whole attachment feature could be done in a core plugin, or even move notification emails to a plugin.

That way notification plugin could also use other media than mails.

DenisChenu

DenisChenu

2016-04-08 12:39

developer   ~37134

+1 for sammousa :)

DenisChenu

DenisChenu

2016-06-29 15:44

developer   ~39809

In https://framagit.org/SondagePro-LimeSurvey-plugin/sendPdfReport i use my own mail settings to add attachements.
But i don't deacvtivate the core system ....

DenisChenu

DenisChenu

2019-03-27 14:20

developer   ~51168

By plugin : can be done here : https://github.com/LimeSurvey/LimeSurvey/commit/de63762472630ab797db4ae65899a53c165eef70

DenisChenu

DenisChenu

2019-03-27 14:38

developer   ~51172

A plugin can add own system in 4.0 because can add anything in before(Token|Survey)Email.

The way:

  • Add some string in beforeSurveySettings
  • Test (and replace) this string in beforeTokenEmail
  • If string return a valid file : $this->getEvent()->get('mailer')->addAttachment($resultUrlFile,$resultName)

Then the attachement is done using $resultName with $resultUrlFile

Issue History

Date Modified Username Field Change
2016-04-08 12:35 Mazi New Issue
2016-04-08 12:35 Mazi Status new => assigned
2016-04-08 12:35 Mazi Assigned To => sammousa
2016-04-08 12:36 Mazi Reproducibility have not tried => always
2016-04-08 12:36 Mazi Product Version => 3.0
2016-04-08 12:36 Mazi Target Version => 3.0
2016-04-08 12:36 sammousa Assigned To sammousa =>
2016-04-08 12:37 sammousa Note Added: 37133
2016-04-08 12:39 DenisChenu Note Added: 37134
2016-04-09 15:36 DenisChenu Relationship added related to 09668
2016-04-09 15:36 DenisChenu Relationship added related to 10533
2016-04-30 19:57 DenisChenu Status assigned => new
2016-06-29 15:44 DenisChenu Note Added: 39809
2019-03-27 14:20 DenisChenu Assigned To => DenisChenu
2019-03-27 14:20 DenisChenu Status new => resolved
2019-03-27 14:20 DenisChenu Resolution open => fixed
2019-03-27 14:20 DenisChenu Fixed in Version => 4.0.0dev
2019-03-27 14:20 DenisChenu Note Added: 51168
2019-03-27 14:34 DenisChenu Assigned To DenisChenu =>
2019-03-27 14:34 DenisChenu Status resolved => feedback
2019-03-27 14:34 DenisChenu Resolution fixed => reopened
2019-03-27 14:34 DenisChenu Status feedback => new
2019-03-27 14:34 DenisChenu Fixed in Version 4.0.0dev =>
2019-03-27 14:38 DenisChenu Note Added: 51172