- Posts: 2
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Can I send email conditionally, based on a question response?
- Jefficus
- Topic Author
- Offline
- New Member
Less
More
12 years 2 months ago #73690
by Jefficus
Can I send email conditionally, based on a question response? was created by Jefficus
I want to be able to send a free ebook as a thank-you to the people filling in my survey. I considered doing this by using tokens and public registration, but there are two problems with that: 1) I need to know which of two ebooks they would like sent to them, and 2) I want lots of respondents, so I don't want them to have to register first.
So what I'd LIKE to do is skip the registration/token part and leave the survey open. Then I'd like to have a single question in the survey where they can enter their email address. When the respondent finishes the survey, if and only if they have filled in that field, I would like to generate a thank-you email with attachment, sent to that email address.
Is this possible in LimeSurvey? If not, I suppose I'll have to collect the addresses and send the emails out semi-manually.
So what I'd LIKE to do is skip the registration/token part and leave the survey open. Then I'd like to have a single question in the survey where they can enter their email address. When the respondent finishes the survey, if and only if they have filled in that field, I would like to generate a thank-you email with attachment, sent to that email address.
Is this possible in LimeSurvey? If not, I suppose I'll have to collect the addresses and send the emails out semi-manually.
The topic has been locked.
- Steve01
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 18
- Thank you received: 6
12 years 2 months ago #73734
by Steve01
Mit freundlichen Grüßen/Best regards,
Stefan Gohlke
LimeSurvey Team
Replied by Steve01 on topic Aw: Can I send email conditionally, based on a question response?
Hello,
I don't think it is possible without changing/touching the source code of LimeSurvey. The first problem can be to attach a file in your email (and if I remember correctly LimeSurvey doesn't support that at the moment). The second problem is to trigger when and what email is sent. In the forum it was mentioned a few times that the ExpressionManager might get a email() function so you can send an email if the participant does something with a question/answers. But you might have to wait for the release of LimeSurvey 1.92 or even later versions.
But how about a little workaround:
- Create a question and ask if and what ebook the would like to have at the end of your survey.
- Upload both ebooks, e.g. to your own server, file hoster as survey resource in your LimeSurvey installation.
- Create two text display questions. Offer a link to the specific ebook and use conditions to show/hide the text display you want.
I don't think it is possible without changing/touching the source code of LimeSurvey. The first problem can be to attach a file in your email (and if I remember correctly LimeSurvey doesn't support that at the moment). The second problem is to trigger when and what email is sent. In the forum it was mentioned a few times that the ExpressionManager might get a email() function so you can send an email if the participant does something with a question/answers. But you might have to wait for the release of LimeSurvey 1.92 or even later versions.
But how about a little workaround:
- Create a question and ask if and what ebook the would like to have at the end of your survey.
- Upload both ebooks, e.g. to your own server, file hoster as survey resource in your LimeSurvey installation.
- Create two text display questions. Offer a link to the specific ebook and use conditions to show/hide the text display you want.
Mit freundlichen Grüßen/Best regards,
Stefan Gohlke
LimeSurvey Team
The following user(s) said Thank You: Jefficus
The topic has been locked.
- Mazi
- Offline
- Official LimeSurvey Partner
12 years 2 months ago #73742
by Mazi
Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
Replied by Mazi on topic Aw: Can I send email conditionally, based on a question response?
vierundzwanzig is correct, you can't send email attachents using Limesurvey.
I would also recommend to upload those ebooks to your server. You can than code a script to which a user is redirected at the end of the survey. The script gets passes some IDs and then checks if the answer data set is complete and which ebook the user prefers to read. It can then send an email with a link to the according file for download.
I would also recommend to upload those ebooks to your server. You can than code a script to which a user is redirected at the end of the survey. The script gets passes some IDs and then checks if the answer data set is complete and which ebook the user prefers to read. It can then send an email with a link to the according file for download.
Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The following user(s) said Thank You: Jefficus
The topic has been locked.
- Jefficus
- Topic Author
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
12 years 2 months ago #73785
by Jefficus
Replied by Jefficus on topic Can I send email conditionally, based on a question response?
Those are both good suggestions. I'm going to do some tests to see if I can make something like that work.
Thanks.
Thanks.
The topic has been locked.
- Mazi
- Offline
- Official LimeSurvey Partner
12 years 2 months ago #73811
by Mazi
Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
Replied by Mazi on topic Can I send email conditionally, based on a question response?
Once you have set up a working solution, please describe your aproach here for others facing the same problem.
Thanks!
Thanks!
Best regards/Beste Grüße,
Dr. Marcel Minke
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.
- sequoia
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
12 years 1 month ago - 12 years 1 month ago #76910
by sequoia
Replied by sequoia on topic Can I send email conditionally, based on a question response?
I have an additional inquiry concerning this topic, and I currently am up to date using 1.92+
The condition: depending on an answer, each answer would tie into delivering the detailed admin notification to a specific email.
Case scenario: You have several students taking an exam at several different schools in the district. One question asks which school they attend. By the student selecting the school they attend, the detailed notification email will be sent to that principal's email.
Would this be possible in the 1.92+ version? If so, how best to go about it
Any input would be greatly appreciated, and thanks in advance.
The condition: depending on an answer, each answer would tie into delivering the detailed admin notification to a specific email.
Case scenario: You have several students taking an exam at several different schools in the district. One question asks which school they attend. By the student selecting the school they attend, the detailed notification email will be sent to that principal's email.
Would this be possible in the 1.92+ version? If so, how best to go about it
Any input would be greatly appreciated, and thanks in advance.
Last edit: 12 years 1 month ago by sequoia.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13647
- Thank you received: 2491
12 years 1 month ago #76913
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Can I send email conditionally, based on a question response?
Hello,
Personnaly, i use some ajax function to send something by email.
Look at :
api.jquery.com/jQuery.ajax/ tolauch a php script with some parameter.
php.net/manual/function.mail.php
www.php.net/manual/function.mail.php#105661
For some php script to send mail
Personnaly, i use some ajax function to send something by email.
Look at :
api.jquery.com/jQuery.ajax/ tolauch a php script with some parameter.
php.net/manual/function.mail.php
www.php.net/manual/function.mail.php#105661
For some php script to send mail
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- sequoia
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
12 years 1 month ago #76915
by sequoia
Replied by sequoia on topic Can I send email conditionally, based on a question response?
Thanks Denis for your input.
If I find a resolution with any of those listed links I'll be sure to post on here.
If I find a resolution with any of those listed links I'll be sure to post on here.
The topic has been locked.
- sequoia
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
12 years 1 month ago #77167
by sequoia
Replied by sequoia on topic Can I send email conditionally, based on a question response?
I have a question concerning another option.
In layman terms it possible to enter a db query in the "Send detailed admin notification email to:" entry box to call up the email tied in with a specified response?
That or, add to the call for the notification email a db query for that answer tied in with a specific email?
In layman terms it possible to enter a db query in the "Send detailed admin notification email to:" entry box to call up the email tied in with a specified response?
That or, add to the call for the notification email a db query for that answer tied in with a specific email?
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13647
- Thank you received: 2491
12 years 1 month ago #77260
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Can I send email conditionally, based on a question response?
Yes,
You can use :
{INSERTANS:ssssXgggggXqqqqqaaa} ( see SGQA ) or {QUESTIONCODE}
in admin mail.
But you can't use some "condition" for sending this mail
Denis
You can use :
{INSERTANS:ssssXgggggXqqqqqaaa} ( see SGQA ) or {QUESTIONCODE}
in admin mail.
But you can't use some "condition" for sending this mail
Denis
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.