- Posts: 8
- Thank you received: 1
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
- Topic Author
- Offline
- New Member
- holch
- Away
- LimeSurvey Community Team
- Posts: 11758
- Thank you received: 2753
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.
- cdorin
- Offline
- Elite Member
- Posts: 234
- Thank you received: 40
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.
- DenisChenu
- Offline
- LimeSurvey Community Team
- Posts: 13935
- Thank you received: 2551
Please ...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 ) .
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.
- kclingerman
- Topic Author
- Offline
- New Member
- Posts: 8
- Thank you received: 1
$this->addCustomHeader("Reply-To: email@domain.com");
Line 219 contains this:
$this->addCustomHeader("X-Surveymailer",Yii::app()->getConfig("sitename")." Emailer (LimeSurvey.org)");
Obviously this will add the header to any emails sent from LimeSurvey so comment it out when you aren't using it.
- DenisChenu
- Offline
- LimeSurvey Community Team
- Posts: 13935
- Thank you received: 2551
Totally silly and stupid to update LimeSurvey core when a plugin can be really easy to do ...kclingerman wrote: ....
in case anyone needs this in the future and the file has changed so line numbers aren't the same.
...
You have sample here : github.com/LimeSurvey/LimeSurvey/tree/ma...ins/mailSenderToFrom
In function beforeEmail, just add
$limeMailer = $this->getEvent()->get('mailer'); $limeMailer->AddReplyTo('replyto@example.org', 'Reply to name');
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.
- holch
- Away
- LimeSurvey Community Team
- Posts: 11758
- Thank you received: 2753
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.
- DenisChenu
- Offline
- LimeSurvey Community Team
- Posts: 13935
- Thank you received: 2551
Updating LimeSurvey core are always a bad solution.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.
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.
- holch
- Away
- LimeSurvey Community Team
- Posts: 11758
- Thank you received: 2753
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.
- kclingerman
- Topic Author
- Offline
- New Member
- Posts: 8
- Thank you received: 1
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!
- DenisChenu
- Offline
- LimeSurvey Community Team
- Posts: 13935
- Thank you received: 2551
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.
- kclingerman
- Topic Author
- Offline
- New Member
- Posts: 8
- Thank you received: 1
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.