- Posts: 215
- Karma: 5
- Thank you received: 6
Send additional email on submit
3 years 7 months ago #134347
by dweisser
Send additional email on submit was created by dweisser
I would like to send additional emails on submit. I have sendmail.php which works in other contexts. Does anyone have a thought on why it's not firing on the survey submit?
$(document).ready(function(){
$('#movesubmitbtn').click(function(){
SendEmail();
});
});
function SendEmail() {
var email = 'myemail@gmail.com';
$.ajax({
url:'http://www.domainname.com/surveyassets/sendmail.php?email_tocheck=' + email,
complete: function (response) {
$('#output').html(response.responseText);
},
error: function () {
$('#output').html('Bummer: there was an error!');
}
});
return false;
}
Please Log in or Create an account to join the conversation.
3 years 7 months ago #134353
by dweisser
Replied by dweisser on topic Send additional email on submit
Blaach.....i had a problem in my php!
Please Log in or Create an account to join the conversation.
- DenisChenu
-
- Offline
- LimeSurvey Community Team
-
Less
More
- Posts: 11993
- Karma: 413
- Thank you received: 2187
3 years 7 months ago #134359
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 .
An error happen ? Before make a new topic : remind the Debug mode .
Replied by DenisChenu on topic Send additional email on submit
Hi,
Why not use afterSurveySubmitted ?
Why not use afterSurveySubmitted ?
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 .
An error happen ? Before make a new topic : remind the Debug mode .
Please Log in or Create an account to join the conversation.
3 years 7 months ago #134362
by dweisser
Replied by dweisser on topic Send additional email on submit
I'm not familiar with that. Does it accept Expression Manager variables like can I get expression questions into the emails? One problem with using the method above is that it's more difficult to get the questions and answers than it is using Expression Manager.
Please Log in or Create an account to join the conversation.
3 years 7 months ago #134364
by dweisser
Replied by dweisser on topic Send additional email on submit
Can I send multiple detailed notification emails using EM variables in General Settings>?
For example, something like this?
If Q1 ==A3, send two emails. If not A3, send no emails.
This isn't working.
{if(Q1.NAOK=='A3','This email address is being protected from spambots. You need JavaScript enabled to view it.; This email address is being protected from spambots. You need JavaScript enabled to view it.','')}
Any thoughts?
For example, something like this?
If Q1 ==A3, send two emails. If not A3, send no emails.
This isn't working.
{if(Q1.NAOK=='A3','This email address is being protected from spambots. You need JavaScript enabled to view it.; This email address is being protected from spambots. You need JavaScript enabled to view it.','')}
Any thoughts?
Please Log in or Create an account to join the conversation.
3 years 7 months ago #134369
by first
Survey Designer and Programmer
Replied by first on topic Send additional email on submit
Working for me on Version 2.06+ Build 150612.
Check if your Q1.NAOK=='A3 is True by printing on next page.
Check if your Q1.NAOK=='A3 is True by printing on next page.
Survey Designer and Programmer
Please Log in or Create an account to join the conversation.
3 years 7 months ago #134370
by dweisser
Replied by dweisser on topic Send additional email on submit
It is true.
The email does send conditionally if only one email is included., as in:
{if(Q1.NAOK=='A3','This email address is being protected from spambots. You need JavaScript enabled to view it.','')}
For some reason the inclusion of the second email causes neither to be sent. Two emails work fine (separated by a semi-colon and a space) when there is Expression Manager logic applied.
I've tried single quotes, double quotes, no quotes, comma an semi-colons. No joy.
The email does send conditionally if only one email is included., as in:
{if(Q1.NAOK=='A3','This email address is being protected from spambots. You need JavaScript enabled to view it.','')}
For some reason the inclusion of the second email causes neither to be sent. Two emails work fine (separated by a semi-colon and a space) when there is Expression Manager logic applied.
I've tried single quotes, double quotes, no quotes, comma an semi-colons. No joy.
Please Log in or Create an account to join the conversation.