Welcome to the LimeSurvey Community Forum

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

Separate Send from and Reply to email addresses

  • kclingerman
  • kclingerman's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 1 month ago #193885 by kclingerman
Replied by kclingerman on topic Separate Send from and Reply to email addresses
Yeah I have considered temporarily modifying the $customheaders variable in limesurvey/application/controllers/admin/tokens.php to include a Reply-To email header. Any idea if that might work? I will find some time to test it in the next couple days. Thank you for the suggestion to get a list of participants and their links and use a separate tool to deliver the email. If I can't get LimeSurvey to do it that will probably be my only option.
The topic has been locked.
  • holch
  • holch's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 1 month ago #193888 by holch
I am not a coding expert, so you will have to wait for someone with more experience in this field to weigh in.

Maybe Denis has a plugin for this. You never know...

www.sondages.pro/
gitlab.com/SondagesPro/mailing

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

The topic has been locked.
More
4 years 1 month ago #193892 by cdorin
Though you can create the feature request and if it is requested + easy to be implemented, we may take it into account (in LS 4 :) ) .

Manual: manual.limesurvey.org/LimeSurvey_Manual
Bugs tracker: bugs.limesurvey.org/my_view_page.php
If you self-host and need help, contact one of our partners: limesurvey.com
Please do not contact me via PM - thank you.
The following user(s) said Thank You: holch
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 1 month ago #193904 by DenisChenu
Replied by DenisChenu on topic Separate Send from and Reply to email addresses

cdorin wrote: Though you can create the feature request and if it is requested + easy to be implemented, we may take it into account (in LS 4 :) ) .

Please ...

Not a new setting used by only some people again and again ....

It's easily doable in plugin in 4.X, core plugin why not ... but not in all survey ... because really rarely needed

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.
  • kclingerman
  • kclingerman's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 1 month ago #193965 by kclingerman
Replied by kclingerman on topic Separate Send from and Reply to email addresses
The quick hacky way to accomplish this was(in v4) to edit limesurvey/application/core/LimeMailer.php and add this line below line 219(as of 2/13/2020):
Code:
$this->addCustomHeader("Reply-To: email@domain.com");

Line 219 contains this:
Code:
$this->addCustomHeader("X-Surveymailer",Yii::app()->getConfig("sitename")." Emailer (LimeSurvey.org)");
in case anyone needs this in the future and the file has changed so line numbers aren't the same.

Obviously this will add the header to any emails sent from LimeSurvey so comment it out when you aren't using it.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 1 month ago #193970 by DenisChenu
Replied by DenisChenu on topic Separate Send from and Reply to email addresses

kclingerman wrote: ....
in case anyone needs this in the future and the file has changed so line numbers aren't the same.
...

Totally silly and stupid to update LimeSurvey core when a plugin can be really easy to do ...

You have sample here : github.com/LimeSurvey/LimeSurvey/tree/ma...ins/mailSenderToFrom

In function beforeEmail, just add
Code:
$limeMailer = $this->getEvent()->get('mailer');
$limeMailer->AddReplyTo('replyto@example.org', 'Reply to name');
And it's done ....

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.
  • holch
  • holch's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 1 month ago #193982 by holch
Denis, not everyone is as firm with the plugin system for Limesurvey as you are.

kclingerman needed a quick solution and this is what he found. Might there be a better solution? Obviously, as you have shown. But we should be happy that he was giving back to the community, most people here are only taking.

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

The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 1 month ago #193983 by DenisChenu
Replied by DenisChenu on topic Separate Send from and Reply to email addresses

holch wrote: Denis, not everyone is as firm with the plugin system for Limesurvey as you are.

kclingerman needed a quick solution and this is what he found. Might there be a better solution? Obviously, as you have shown. But we should be happy that he was giving back to the community, most people here are only taking.

Updating LimeSurvey core are always a bad solution.

And here : there are sample clear and easy to adapt.

LimeMailer : 799 lines
mailSenderToFrom : 48 lines

We have an extandable system : we must give good advice on forum not broken advice ... that potentially broke update ...

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.
  • holch
  • holch's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 1 month ago #193992 by holch

We have an extandable system : we must give good advice on forum not broken advice ... that potentially broke update ...


I agree. But your post doesn't sound like "good advice" but like a grumpy old grandpa... ;-)

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

The topic has been locked.
  • kclingerman
  • kclingerman's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 1 month ago #193994 by kclingerman
Replied by kclingerman on topic Separate Send from and Reply to email addresses
Thank you all for the feedback, I really like LimeSurvey and I understand Denis' point of view some noob coming in and doing things wrong :P

Thank you for providing a better way for people to accomplish this in the future Denis!

I will try to see if I can get together a plugin which does exactly what I want and share it with the community. I am no expert in PHP but I hope I can contribute!
The following user(s) said Thank You: holch
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 1 month ago #193995 by DenisChenu
Replied by DenisChenu on topic Separate Send from and Reply to email addresses
No, @kclingerman : @holch have right. Maybe I was right on the substance, but clearly not on the form.

Otherwise: I criticize the method, not the person. It also happens to me to write stupid and silly things.

For the plugin :
Start with mailSenderToFrom : update it in a new directory inside ./plugins

mailAnswerTo, rename the php file to mailAnswerTo.php
find mailSenderToFrom in the php file to mailAnswerTo, same in config file.

Remove the code here:
github.com/LimeSurvey/LimeSurvey/blob/d6...erToFrom.php#L40-L45

And replace by (for example)

$limeMailer->AddReplyTo(App()->getConfig('siteadminemail'));

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
The topic has been locked.
  • kclingerman
  • kclingerman's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 1 month ago #194008 by kclingerman
Replied by kclingerman on topic Separate Send from and Reply to email addresses
Thank you for the advice!

Can you direct me to some documentation on adding settings to a survey? I would like to be able to set the reply-to address per survey.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose