Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Email and EM (1.92)

Email and EM (1.92) 2 years 7 months ago #71403

  • fransmarcelissen
  • fransmarcelissen's Avatar
  • NOW ONLINE
  • Expert Lime
  • Posts: 150
  • Thank you received: 24
  • Karma: 7
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 administrator has disabled public write access.

Re: Email and EM (1.92) 2 years 7 months ago #71404

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 82
  • Karma: 36
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 administrator has disabled public write access.

Re: Email and EM (1.92) 2 years 7 months ago #71611

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5324
  • Thank you received: 294
  • Karma: 249
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)limesurvey.org'"
The administrator has disabled public write access.

Re: Email and EM (1.92) 2 years 7 months ago #71612

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 82
  • Karma: 36
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 administrator has disabled public write access.

Re: Email and EM (1.92) 2 years 7 months ago #71624

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5324
  • Thank you received: 294
  • Karma: 249
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)limesurvey.org'"
The administrator has disabled public write access.

Re: Email and EM (1.92) 2 years 7 months ago #71625

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 82
  • Karma: 36
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 administrator has disabled public write access.

Re: Email and EM (1.92) 2 years 7 months ago #71672

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5324
  • Thank you received: 294
  • Karma: 249
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)limesurvey.org'"
The administrator has disabled public write access.

Re: Email and EM (1.92) 2 years 7 months ago #71746

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 82
  • Karma: 36
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
The administrator has disabled public write access.

Re: Email and EM (1.92) 2 years 7 months ago #71760

  • fransmarcelissen
  • fransmarcelissen's Avatar
  • NOW ONLINE
  • Expert Lime
  • Posts: 150
  • Thank you received: 24
  • Karma: 7
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 administrator has disabled public write access.

Re: Email and EM (1.92) 2 years 7 months ago #71766

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6276
  • Thank you received: 801
  • Karma: 240
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
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: ITEd
Time to create page: 0.194 seconds
Donation Image