Welcome to the LimeSurvey Community Forum

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

Setting a global "From" field for sending e-mails (work around)

  • alexandrelefebvre
  • alexandrelefebvre's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 7 months ago #188739 by alexandrelefebvre
Hello,

Limesurvey uses the survey administrator e-mail as the "From" field of e-mails being sent.
This causes problems: at best emails are handled as spams/phishing, and for some e-mail domains, they are simply not delivered at all.

As we understand, we haven't found a global settings parameter to replace the survey administrator e-mail in the "From" field with a unique trusted e-mail address.

For information and as a work around, the following "brute-force trick" does the job.
  1. edit file application/third_party/phpmailer/src/PHPMailer.php
  2. look for function setFrom
  3. comment out lines
    $this->From = $address;
    $this->FromName = $name;
    if ($auto) {
    if (empty($this->Sender)) {
    $this->Sender = $address;
    }
    }
  4. replace them with
    $this->From = 'your.email@your.domain';
    $this->FromName = 'Your Name';
    $this->Sender = 'your.email@your.domain';
    using the email and name which will be trusted when sending e-mail

Clearly, this is a missing feature in Limesurvey to be able to specify globally the From and FromName fields.

Best,

alex
The topic has been locked.
More
4 years 7 months ago #188789 by jelo

alexandrelefebvre wrote: Clearly, this is a missing feature in Limesurvey to be able to specify globally the From and FromName fields.

Submitting or supporting a feature request will help to informa the developers about the missing feature.

www.limesurvey.org/community/feature-requests

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • alexandrelefebvre
  • alexandrelefebvre's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 7 months ago #188790 by alexandrelefebvre
Thanks jelo.

I've just submitted the feature request.

Best.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 7 months ago - 4 years 7 months ago #188795 by DenisChenu
My answer on this feature (personnal opinion)
bugs.limesurvey.org/view.php?id=15282


  1. Admin email can be edited on the survey settings
  2. This can be «easily» done using a plugin using beforeTokenEmail
  3. There are already a core plugin in core of LS4 (next version): 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.
Last edit: 4 years 7 months ago by DenisChenu. Reason: core of LS4 (next version)
The following user(s) said Thank You: alexandrelefebvre
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose