Email and EM (1.92)

More
5 years 4 months ago #71403 by fransmarcelissen
fransmarcelissen created the topic: Email and EM (1.92)
Does the Expression Manager work within emails? As far as I understand it is only possible to use tokens within emails, and I did not succeed in using an if statement. I also do'nt see a reference to email in the EM documentation.
If it does n't work, are there any plans for coming releases?
Thanks
Frans

Please Log in to join the conversation.

More
5 years 4 months ago #71404 by TMSWhite
TMSWhite replied the topic: Email and EM (1.92)
Frans-

Yes, EM is supposed to work within emails. You found a bug. Thanks (really - I'm looking for people to do real-world tests on 1.92 RCx so that we can get it to stable release status as soon as possible). This is fixed in revision 11911 (so is now available in the HEAD revision of limesurey_dev, if you work with the Subversion source code; and will be available in 1.92 RC2)

/Tom

Please Log in to join the conversation.

More
5 years 4 months ago #71611 by Mazi
Mazi replied the topic: Email and EM (1.92)
To what extend can EM be used at email? Would it be possible to add some EM syntax e.g. at the confirmation email so that a first line would read e.g. "According to the following answers this user can be rated as 'expert' with a score of 'XYZ' points."

...where the '...' parts are dynamic based on some certain survey answers?

What other usage within emails can you think of, Tom?


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
5 years 4 months ago #71612 by TMSWhite
TMSWhite replied the topic: Email and EM (1.92)
Mazi-

You can use EM in email for any data values that have already been set. So, all keywords at the beginning, and presumably data values at the end. I haven't tested that much, but when I added some keywords (and values?) to the admin notification emails, they seemed to work.

So, yes, you should be able to do conditional messages within emails.

/Tom

Please Log in to join the conversation.

More
5 years 4 months ago #71624 by Mazi
Mazi replied the topic: Email and EM (1.92)
Thanks for your feedback. I think this is worth testing because I'm wondering if Limesurvey will "know" about the current data set on which such calculations should be based on. Since the session is not yet destroyed when the confirmation email is sent I expect the data to be available but I'm not sure about the technical background details.


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
5 years 4 months ago #71625 by TMSWhite
TMSWhite replied the topic: Email and EM (1.92)
It also makes me wonder whether we should create an email() function in EM so that people can conditionally send emails from within the survey itself. Then it would definitely have access to the desired data, and you could do robust conditional logic.

Please Log in to join the conversation.

More
5 years 4 months ago #71672 by Mazi
Mazi replied the topic: Email and EM (1.92)
By conditionally sending emails do you mean something like "Send an email to This email address is being protected from spambots. You need JavaScript enabled to view it. if a user has answered question X = 'I hate your product'"?

That would be a really cool feature and I have seen some requests like this. So it's definitely worth putting it on the to do list or adding it at the feature tracker.

BTW, did you already clean up the feature tracker now that so many great new feature will be available using EM? There should be at least 10 ideas I guess which we can mark "implemented"?!


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
5 years 4 months ago #71746 by TMSWhite
TMSWhite replied the topic: Email and EM (1.92)

Mazi wrote: By conditionally sending emails do you mean something like "Send an email to This email address is being protected from spambots. You need JavaScript enabled to view it. if a user has answered question X = 'I hate your product'"?

That would be a really cool feature and I have seen some requests like this. So it's definitely worth putting it on the to do list or adding it at the feature tracker.


Mazi, that's exactly what I mean. I could add an email() function within EM that calls the internal LS email system (so it properly uses sendmail, gmail, etc.). Each of the arguments can be tailored using EM. A main concern first, however, is how to handle security so that people don't spam. One option is to set a global permission that keeps email-from-within-survey functionality off. There may be more elegant solutions, like verifying that the sender has a real email address, but that could wait if the global option is adequate.

Also, the PHP version of email() is easy. Finding a good JavaScript equivalent is another matter. php2js.org doesn't have one. I see several people with Ajax-based ones. I think it's pretty safe to assume that if people want to email, that they can wait for the user to click next. However, from a usability perspective, you might also want to email the person if they get to a page and enter some data, then abandon the page - e.g. to see whether they had trouble completing the survey.

/Tom

Please Log in to join the conversation.

More
5 years 4 months ago #71760 by fransmarcelissen
fransmarcelissen replied the topic: Email and EM (1.92)
Hi Tom,
Considering the issue of "spam": in general I think it is the responsibility of the author to decide whether he should do "bad things". Both solutions make use ánd misuse of the mail sligtly more difficult, but are no problem for a clever crook.
Frans

Please Log in to join the conversation.

More
5 years 4 months ago #71766 by DenisChenu
DenisChenu replied the topic: Email and EM (1.92)

TMSWhite wrote: I think it's pretty safe to assume that if people want to email, that they can wait for the user to click next.

I think click 'next' is a validate the answer in the page,

When we talk : "send email too" function under certain condition, i think we speak ( in general) send an alert email at a administrator, or client services ... something internal of the office: then maybe block INSERTANS or TOKEN for this email, only hard email adress ( just to avoid spam).

No ?

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 (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
5 years 4 months ago #71804 by Mazi
Mazi replied the topic: Email and EM (1.92)
@Tom: I also think spam is not such a big issue when implementing this.

I'm also thinking about doing the validation on the last page, after a user submits results (that is the event that triggers sending confirmation emails). This should cover nearly all requirements and should make validation pretty easy.


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
2 years 1 month ago #118817 by nwinter
nwinter replied the topic: Email and EM (1.92)
It's been a while, but I thought I'd resurrect this topic. I would very find very useful an email() function in EM. Right now I have a survey with a very long, complex confirmation email message that includes lots of conditional logic and answers from the survey. EM works beautifully to construct it.

However, I would like to be able to trigger an email of this sort from within the survey, without waiting for submit. Why? Because I'd like to allow people to enter some of the survey, email themselves a report, then save their responses for further work later, then eventually submit.

So an alternative, I suppose, would be to find a way in custom javascript to trigger the confirmation email routine. Any suggestions along either line here?

Thanks much!

Please Log in to join the conversation.

More
2 years 1 month ago #118844 by tpartner
tpartner replied the topic: Email and EM (1.92)
You won't be able to use JavaScript to trigger the LimeSurvey confirmation but you could make an AJAX call to a remote PHP script that sends a mail.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
2 years 1 month ago #118864 by nwinter
nwinter replied the topic: Email and EM (1.92)
That makes sense, and I am exploring just such a solution. However, that requires a lot of work to package and transmit the contents of the email, which is html-formatted. I can do that, but it's basically reinventing functionality that is already in place and well-tested.

I may just give up on the email and present the formatted report as a giant text-display, which users can then copy and paste as needed.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now