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
Return to the default flat view Create a new topic Submit Reply
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 previous message
csoft_kevin is currently offline  csoft_kevin   United Kingdom
Messages: 1
Registered: November 2010
Karma:
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
[Message index]
 
Read Message
Read Message
Read Message
Read Message
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: Wed Nov 27 03:25:53 GMT 2024

Total time taken to generate the page: 0.03980 seconds