Author Topic: different mailbox address for each group  (Read 15318 times)

0 Members and 1 Guest are viewing this topic.

mikew

  • Full Member
  • ***
  • Posts: 7
different mailbox address for each group
« 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!

faf

  • Mibew Staff Member
  • Native
  • *****
  • Posts: 951
    • Mibew Messenger
Re: different mailbox address for each group
« Reply #1 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.

mikew

  • Full Member
  • ***
  • Posts: 7
Re: different mailbox address for each group
« Reply #2 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))