Change the send from of a notification

More
2 months 2 days ago #199078 by Yannobi
Hi,

Warning : very specific use !!!

I use Limesurvey as a kind of filter to generate tickets for Support IT.

People (users!) answers questions with conditions. It helps to categorises and have specifics informations important for IT.

At the end of the survey, i send a notification to a mail collector that parse automaticly and create tickets (in a web application specific for IT Support). One answer to the survey = One ticket created

To send the mail, i use the notification. It's ok with that execpt the fact that the mail sent as the address mail of the administrator of livesurvey. I need to change the "send from" of this notification. It must be the mail of the user that answered the survey (this infomation is in the list of participants because i have an Active Directory synchro)

Do you know where i can do that ? Probably in the code ? And in the code, how can i find a way to inject the mail address of the user ? Perhaps a way to change the code in the last button of the survey ? Or had a function that send the mail ?

If you have an idea, i'll appreciate.

Please Log in to join the conversation.

LimeSurvey Partners
More
2 months 2 days ago #199087 by holch
It is probably easier to use a small custom script (triggered by the end url) to send the email rather than hacking the LS code.

Or maybe use the API to get the responses of the finished survey into your system automatically.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Please Log in to join the conversation.

More
2 months 1 day ago #199096 by DenisChenu
LimeSurvey version ?


If it's 4.X : you don't have to hack the code , pluginncan do it


Event to use : manual.limesurvey.org/BeforeSurveyEmail
Sample : github.com/LimeSurvey/LimeSurvey/tree/ma...ins/mailSenderToFrom

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 following user(s) said Thank You: holch

Please Log in to join the conversation.

More
2 months 1 day ago #199128 by Yannobi
Limesurvey Version is Version 2.57.1+161205

Bad ?
Very bad ?

Please Log in to join the conversation.

More
2 months 1 day ago #199129 by DenisChenu
Security issue and a lot of other issue …

But since it's really too old : you can hack …

To see where it's done : grep -r emailnotificationto * on application directory.

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 following user(s) said Thank You: Yannobi

Please Log in to join the conversation.

More
2 months 1 day ago #199130 by holch

Limesurvey Version is Version 2.57.1+161205

Bad ?
Very bad ?


Pretty bad, yes. As you can see from the 161205, your version was released on 05.12.2016, so basically 3,5 years. There are even newer versions from your branch, it should be somewhere at 2.7x or so.

If it's 4.X : you don't have to hack the code , pluginncan do it


@Denis: cool. Waiting for 4.x becoming "production stable".

@Yannobi: If you update, which is recomendable, I would not go to LS 4.x yet, because I wouldn't consider LS 4 ready for "production". If it is still for testing, this is fine (please report bugs as much as you can), but if it is for real surveys, I think I personally would not use LS 4 yet. There just to many things that are not working good enough at the moment for my taste (e.g. when randomizing subquestions, answer options are automatically randomized as well, which will render certain research approaches with scales such as 1-5, 1-7, 1-10 useless, when those numbers that should be in order are randomized, but there are some other examples as well). I hope in the next couple of months that LS 4.x will become production stable though.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Please Log in to join the conversation.

More
2 months 1 day ago #199141 by DenisChenu
+1 for @holch

In 3.X : you must replace by your own system

See gitlab.com/SondagesPro/mailing/adminNotificationHtmlAnswerTable for a sample (here : it update Answertable)

It send the email here : gitlab.com/SondagesPro/mailing/adminNoti...AnswerTable.php#L198

And seems testes in 3.41 : gitlab.com/SondagesPro/mailing/adminNoti...lAnswerTable.php#L53

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.

Please Log in to join the conversation.

More
2 months 14 hours ago #199203 by Yannobi
Ok, i upgrade in 3.22.15

Thanks all.

Please Log in to join the conversation.

More
2 months 14 hours ago #199204 by DenisChenu
Yep,

Yopu can upgrade to a stable and LTS version and create a plugin :)

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.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now