Mibew Messenger Community

General => Support => Topic started by: mikew on March 19, 2021, 08:58:37 PM

Title: different mailbox address for each group
Post by: mikew on March 19, 2021, 08:58:37 PM
At config.yml file we find "mailbox: name@yourdomain.com"
How can i set a different mail sender address for each group?
p.s. awsome software!
Title: Re: different mailbox address for each group
Post by: faf on March 19, 2021, 10:11:09 PM
At the moment there are no such feature in Mibew Messenger.

I see two possible ways to do so. Both of them aren't simple.

First one is to rewrite some parts of the core of Mibew. See libs/classes/Mibew/Mail/. BTW, if you implement this feature and send pull request, it will be possible to include it in the code base.  ;)

Second one is not related to Mibew Messenger itself. One could implement some kind of filtering tool on the server side to change "From:" mail header depending on a value of "To:" mail header before actually sending an email.
Title: Re: different mailbox address for each group
Post by: mikew on March 20, 2021, 08:35:52 PM
Ok, there is no real problem, because the mail header has the "ReplyTo" option.
Therefore the answer goes to the right recipient.

I also made the following change in file /libs/classes/Mibew/Mail/Utils.php
at line 69: ->setFrom(MIBEW_MAILBOX)
changed to: ->setFrom(self::normalizeAddress($reply_to))