Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

About E-mail function in limesurvey.

  • tomtom
  • tomtom's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 2 months ago #162944 by tomtom
About E-mail function in limesurvey. was created by tomtom
Hi there,

I am exploring limesurvey function or javascript with auto e-mail to a specific person if a participant got a significant assessment result.

Case:
A group of students has participated a math assessment. One(May be more than one ..) student got full marks.

I would like to know if limesurvey can automatically email to the full mark student's subject teacher (known e-mail address) in final "thank you" page or equation page. My limesurvey system has SMTP function.

Thank you.
The topic has been locked.
More
6 years 2 months ago #162983 by jelo
Replied by jelo on topic About E-mail function in limesurvey.
What version of LimeSurvey do you use or test?
Further infos are about LS 3.0 (can be found at different places in LS 2.X too).

You can use one of the administration messages in the settings to mail results.

Basic admin notification or Detailed admin notification.
In LS 3.0 under Settings -> Email templates

The emailadress has to be a variable, which you would assign during the survey via Expression Manager.
These variables have to placed in Settings -> Notification and data management settings
If you use tokens, you might add this info (e.g. subject teacher emailadress) as attributes. That makes it a lot easier to get the individual info about every student at one place.

Expression manager: manual.limesurvey.org/Expression_Manager

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • tomtom
  • tomtom's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 2 months ago #162985 by tomtom
Replied by tomtom on topic About E-mail function in limesurvey.
Hi Jelo,

Thank you for your reply. I am using Limesurvey 2.76, I can see there is a Email settings under Configurations > Setting > Global settings. Should I upgrade the system to version 3 for the auto email result function?

My designed math assessment is open to all student, no token required.
The topic has been locked.
More
6 years 2 months ago #162986 by jelo
Replied by jelo on topic About E-mail function in limesurvey.
The functionality is available in 2.76 too. The wording of the menu items differs from my description.
So no need to upgrade to LS 3. And I wouldn't recommend that.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • tomtom
  • tomtom's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 2 months ago #162989 by tomtom
Replied by tomtom on topic About E-mail function in limesurvey.
Hi Jelo,

Thank you! Find the function and start to apply it.
The topic has been locked.
  • tomtom
  • tomtom's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 2 months ago #162990 by tomtom
Replied by tomtom on topic About E-mail function in limesurvey.
Hi, another two questions,

1. (Refer to contact.PNG)
I have create a contact form with "Multiple short text" question type, how could I get the content or any hints for different types of question for similar data extract? Because I want to use it in the email template. I know we can use radio.value to get radio question value....

2. (Refer to set_class.PNG)
I want to send notifications for different teachers. i.e. math total < 50 will email notice with result to teacherA@edu.com, math total < 70 will email notice with result to teacherB@edu.com, math total <= 100 will email notice with result to teacherA@edu.com
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 2 months ago #163005 by holch
Replied by holch on topic About E-mail function in limesurvey.
1. You can access basically all answers given via the Expression Manager and also insert it this way into the email templates. Please refer to the manual about Expression Manager, because how to address the answers depends on the question type. There should also be quite a few answers regarding on how to send "reports" via email or how to create reports at the end of the survey here in the forum.

2. As far as I know, you can use equations in this email field, so you can insert some equation there. However, I would probably process this in an equation type question before, in order to not fill this field too much. In the equation you could could create something like:
Code:
{if(math>50, 'teacher2@school.com','')}
Code not tested, just an example on how to think about it. You need of cours include the ifs for the other conditions. Then you just call the result of this equation type question into the field for the email addresses. Should work, but will require some testing.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The following user(s) said Thank You: tomtom
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 2 months ago #163008 by tpartner
Replied by tpartner on topic About E-mail function in limesurvey.
1) manual.limesurvey.org/Expression_Manager#Access_to_Variables

2) Assuming you have calculated a "total" in an equation question, use Expression Manager IF statements for the email address - manual.limesurvey.org/Expression_Manager#Conditional_Equations .

Code:
{if(total > 50, 'teacherA@edu.com', if(total > 70, 'teacherB@edu.com', 'teacherC@edu.com'))}

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: tomtom
The topic has been locked.
  • tomtom
  • tomtom's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 2 months ago #163012 by tomtom
Replied by tomtom on topic About E-mail function in limesurvey.
Hi holch,

Thank you for your information.
The topic has been locked.
  • tomtom
  • tomtom's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 2 months ago #163013 by tomtom
Replied by tomtom on topic About E-mail function in limesurvey.
Great to see that variable menu!!!!! Thanks Tony
The topic has been locked.
  • tomtom
  • tomtom's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 2 months ago #163071 by tomtom
Replied by tomtom on topic About E-mail function in limesurvey.
A little frustrated:( . I have follow holch, jelo and Tony's all solutions. But finally, I cannot extract participant's multi text answer in email. Please see my attached shots.

I have validate the email template's expressions, all works.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 2 months ago #163072 by holch
Replied by holch on topic About E-mail function in limesurvey.
Afaik .shown does not exist for this question type, as "Name", "Phone", etc. are not answer options, but subquestions.

.shown would work for example with list type questions and would show the text shown for an item opposed to the question code. So in your case, if you would have a single choice question with the items "Name" and "Email" it would display "Name" and "Email" when used.

Try {case_SQ001}, this should give you the response someone has given to "Name".

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose