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

More
10 months 3 weeks 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 = 'This email address is being protected from spambots. You need JavaScript enabled to view it.';
    $this->FromName = 'Your Name';
    $this->Sender = 'This email address is being protected from spambots. You need JavaScript enabled to view it.';
    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

Please Log in to join the conversation.

LimeSurvey Partners
More
10 months 2 weeks ago #188790 by alexandrelefebvre
Thanks jelo.

I've just submitted the feature request.

Best.

Please Log in to join the conversation.

More
10 months 2 weeks ago - 10 months 2 weeks 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: 10 months 2 weeks ago by DenisChenu. Reason: core of LS4 (next version)
The following user(s) said Thank You: alexandrelefebvre

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now