FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » FUDforum Installation Issues » maillist.php produces broken mail header
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
maillist.php produces broken mail header [message #161943] Tue, 23 February 2010 08:29 Go to next message
Harald is currently offline  Harald   Germany
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 #161966 is a reply to message #161943] Sat, 27 February 2010 17:31 Go to previous messageGo to next message
Harald is currently offline  Harald   Germany
Messages: 2
Registered: February 2010
Karma: 0
Junior Member
The error is in mlist_post.inc and occurs only, if no attachment is attached.
I have deactivated the $header variable, it worked but then I am missing important headers like X-FUDforum.
Re: mlist_post.inc produces broken mail header [message #164294 is a reply to message #161966] Wed, 19 January 2011 08:01 Go to previous messageGo to next message
csoft_kevin is currently offline  csoft_kevin   United Kingdom
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
Re: mlist_post.inc produces broken mail header [message #164295 is a reply to message #164294] Wed, 19 January 2011 08:15 Go to previous message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
I belief this was fixed in 3.0.2.

See FUDforum 3.0.2:
"Fix double headers when sending e-mail from the forum to a mailing list."
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Here an atch there an atch, every where an atch atch
Next Topic: error message: FATAL ERROR: anonymous user's ID must be 1!
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon May 06 15:57:37 GMT 2024

Total time taken to generate the page: 0.02402 seconds