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

More
1 month 1 week 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 or Create an account to join the conversation.

LimeSurvey Partners
More
1 month 4 days 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

Please Log in or Create an account to join the conversation.

More
1 month 4 days ago #188790 by alexandrelefebvre
Thanks jelo.

I've just submitted the feature request.

Best.

Please Log in or Create an account to join the conversation.

More
1 month 4 days ago - 1 month 4 days 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 .
An error happen ? Before make a new topic : remind the Debug mode .
Last edit: 1 month 4 days ago by DenisChenu. Reason: core of LS4 (next version)
The following user(s) said Thank You: alexandrelefebvre

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!