maillist.php produces broken mail header [message #161943] |
Tue, 23 February 2010 08:29 |
Harald
Messages: 2 Registered: February 2010
Karma: 0
|
Junior Member |
|
|
maillist.php produces broken mail header for outgoing mails.
Some lines are duplicates, but worse there are to blank lines after Message-ID.
Here I have an example cut out after Errors-To:
X-Mailer: FUDforum v3.0.0
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Content-Type: text/plain;
charset="utf-8"
Content-Transfer-Encoding: 8bit
Organization: Mitgliederforum
In-Reply-To: <1d(dot)4b80522b(at)forum(dot)myserver(dot)de>
X-FUDforum: 6d7d52728aba86b6d3c3e0e4a9cb32c3 <30>
Message-ID: <1e.4b805...@forum.myserver.de>
Content-Type: text/plain;
charset="utf-8"
Content-Transfer-Encoding: 8bit
Organization: Mitgliederforum
In-Reply-To: <1d.4b805...@forum.myserver.de>
X-FUDforum: 6d7d52728aba86b6d3c3e0e4a9cb32c3 <30>
Message-ID: <1e.4b805...@forum.myserver.de>
Thanks,
Harald
|
|
|
|
Re: mlist_post.inc produces broken mail header [message #164294 is a reply to message #161966] |
Wed, 19 January 2011 08:01 |
|
csoft_kevin
Messages: 1 Registered: November 2010
Karma: 0
|
Junior Member |
|
|
The function send_email appears to have a bug where is sends the headers as headers AND in the body under some circumstances. The code in version 3.0.1 is
function send_email($from, $to, $subj, $body, $header='', $munge_newlines=1)
{
if (empty($to)) {
return;
}
/* html entities check */
if (strpos($subj, '&') !== false) {
$subj = html_entity_decode($subj);
}
if ($header) {
$header = "\n" . str_replace("\r", '', $header);
}
$extra_header = '';
if (strpos($header, 'MIME-Version') === false) {
$extra_header = "\nMIME-Version: 1.0\nContent-Type: text/plain; charset=utf-8\nContent-Transfer-Encoding: 8bit".$header;
}
$header = 'From: '.$from."\nErrors-To: ".$from."\nReturn-Path: ".$from."\nX-Mailer: FUDforum v".$GLOBALS['FORUM_VERSION'].$extra_header.$header;
And the penultimate line above should read
$extra_header = "\nMIME-Version: 1.0\nContent-Type: text/plain; charset=utf-8\nContent-Transfer-Encoding: 8bit";
}
This error occurs in all the files that define the function send_email i.e. in the following files
email.php
mmd.php
mmod.php
modque.php
movemsg.php
pmsg_dump.php
pmsg.php
pmsg_view.php
post.php
ppost.php
register.php
remail.php
reset.php
thr_exch.php
all in directory
/var/www/fudforum/theme/default
|
|
|
|