i`d like to modify the header information of that eml file with php:
I want to Remove the Line Message-ID and i want to change the Mail adresses in the Line To. For Example, delete all 3 mail adresses and replace it with one other ...
Can somebody help me?
Received: from server.local (7.6.19.14) by mail.local
(192.168.0.1) with Microsoft SMTP Server id 8.3.298.1; Fri, 19 Jul 2013
08:38:42 +0200
Received: by server.local (Postfix, from userid 1) id 62C961608B7; Fri, 19
Jul 2013 08:38:42 +0200 (CEST)
From: "mail@example.com" <mail@example.com>
To: Recipient <test@test.de>, Recipient <test@test.de>,
Recipient <test@test.de>
Date: Fri, 19 Jul 2013 08:38:42 +0200
Subject: EG...
Thread-Topic: EG...
Thread-Index: Ac6ESpw8LCpOq4iNTOa02MkB6MTlsQ==
Message-ID: <20130719063842.62C961608B7@mail.local>
Accept-Language: en-US
X-MS-Exchange-Organization-AuthAs: Anonymous
X-MS-Exchange-Organization-AuthSource: mail.local
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
Content-Type: multipart/mixed;
boundary="_002_2013074498405156741_"
MIME-Version: 1.0
This is a relatively simple preg_replace problem.... this should give you what you need.
$email = preg_replace('/^Message-ID: .*
/m','', $email);
$email = preg_replace('/^To :(.*)
/m', 'To: $1
', $email);