Welcome to the LimeSurvey Community Forum

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

Email and EM (1.92)

  • fransmarcelissen
  • fransmarcelissen's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
12 years 2 months ago #71403 by fransmarcelissen
Email and EM (1.92) was created by fransmarcelissen
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
The topic has been locked.
  • TMSWhite
  • TMSWhite's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
12 years 2 months ago #71404 by TMSWhite
Replied by TMSWhite on 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
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
12 years 2 months ago #71611 by Mazi
Replied by Mazi on 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
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.
  • TMSWhite
  • TMSWhite's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
12 years 2 months ago #71612 by TMSWhite
Replied by TMSWhite on 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
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
12 years 2 months ago #71624 by Mazi
Replied by Mazi on 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
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.
  • TMSWhite
  • TMSWhite's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
12 years 2 months ago #71625 by TMSWhite
Replied by TMSWhite on 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.
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
12 years 2 months ago #71672 by Mazi
Replied by Mazi on topic Email and EM (1.92)
By conditionally sending emails do you mean something like "Send an email to ABC@DEF.COM 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
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.
  • TMSWhite
  • TMSWhite's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
12 years 2 months ago #71746 by TMSWhite
Replied by TMSWhite on topic Email and EM (1.92)

Mazi wrote: By conditionally sending emails do you mean something like "Send an email to ABC@DEF.COM 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
The topic has been locked.
  • fransmarcelissen
  • fransmarcelissen's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
12 years 2 months ago #71760 by fransmarcelissen
Replied by fransmarcelissen on 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
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
12 years 2 months ago #71766 by DenisChenu
Replied by DenisChenu on 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 , plugin development .
I don't answer to private message.
The topic has been locked.
  • Mazi
  • Mazi's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
12 years 2 months ago #71804 by Mazi
Replied by Mazi on 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
Need Help? We offer professional Limesurvey support: survey-consulting.com
Contact: marcel.minke(at)survey-consulting.com
The topic has been locked.
More
8 years 11 months ago #118817 by nwinter
Replied by nwinter on 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!
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose