Author Topic: Mail_Mime Envelope-To header  (Read 2127 times)

Offline ddehning

  • Newbie
  • *
  • Posts: 2
Mail_Mime Envelope-To header
« on: June 05, 2018, 09:57:48 AM »
Hi everyone,

currently I'm working on a plugin for Roundcube using some functions of Mail_Mime.

At one point (Hooks tested: message_before_send, message_ready) I have to replace the recipient of the mail with another one, so I use

Code: [Select]
$message->get();
$message->headers(array('To'=>implode(',', $recipients)), true);

This code is doing well. But there still is the "Envelope-To"-Header which I can't replace like follows:

Code: [Select]
$message->headers(array('To'=>implode(',', $recipients), 'Envelope-To'=>implode(',', $recipients)), true);
Am I totally wrong? I'm just stuck with this. Can anyone help?

Sincerely
Dominik

Offline alec

  • Hero Member
  • *****
  • Posts: 1,365
Re: Mail_Mime Envelope-To header
« Reply #1 on: June 05, 2018, 11:41:09 AM »
What do you mean replace? Roundcube does not set this header.

Offline ddehning

  • Newbie
  • *
  • Posts: 2
Re: Mail_Mime Envelope-To header
« Reply #2 on: June 05, 2018, 12:21:11 PM »
If it's not roundcube I have to a deeper research.

I change the "to" header and somehow exim or whatever adds the original recipient in the envelope-to header...

Anyhow, thanks for your answer.