mattimaier / bnote

BNote - Open Source Ensemble Management
http://www.bnote.info
GNU General Public License v3.0
23 stars 16 forks source link

Reworked mailing to fix spam problems #546

Closed dnop-software closed 1 month ago

dnop-software commented 9 months ago

When a user sends a message, or comments something on the start page, BNote sent emails and used the commenting user's email address as "from" field. It turned out that this triggered spam filters of some mail providers. Especially Google Mail has become very strict when it comes to spam rejection.

Meanwhile, Google does not accept emails at all from domains without either SPF or DKIM. These means of spam protection are in conflict with BNote's way of sending email because it fakes the sender address. If a user's email domain has an SPF record in DNS, only servers listed in that SPF record are allowed to send emails for that domain. The server, BNote is running on, is usually not in that list, and so emails from BNote are rejected as SPAM.

To overcome this problem the BNote mailing class the following changes have been applied to BNote Mailing:

The constructor of the mailing class has been simplified and the argument $to has been removed, because it turned out that this field was often set to null. Now the constructor has just two arguments and the function setTo must be used.

The function getEnsembleEmail in notify.php was removed, because that function was not used anywhere.