1

Topic: small problem with forum mailer

Hi,

I've got a small problem with the forum mailer.
When a mail is sent, the user receive it but at the begining there is this:

"MIME-Version: 1.0

Content-transfer-encoding: 8bit

Content-type: text/plain; charset=iso-8859-1

X-Mailer: PunBB Mailer
Message-Id: <20041006200230.937402861A@60gp.ovh.net>"

I don't want to have it

any idea why this happens?

Ludo

Re: small problem with forum mailer

Not sure this is the problem, but it's worth a try. Open up email.php and find

function pun_mail($to, $subject, $message, $from = '')
{
    global $pun_config, $lang_common;

    // Default sender/return address
    if (!$from)
        $from = $pun_config['o_board_title'].' '.$lang_common['Mailer'].' <'.$pun_config['o_webmaster_email'].'>';

    $message = pun_linebreaks($message);
    $headers = 'From: '.$from."\n".'Date: '.date('r')."\n".'MIME-Version: 1.0'."\n".'Content-transfer-encoding: 8bit'."\n".'Content-type: text/plain; charset='.$lang_common['lang_encoding']."\n".'X-Mailer: PunBB Mailer';

    if ($pun_config['o_smtp_host'] != '')
        smtp_mail($to, $subject, $message, $headers);
    else
        mail($to, $subject, $message, $headers);
}

and replace it with

function pun_mail($to, $subject, $message, $from = '')
{
    global $pun_config, $lang_common;

    // Default sender/return address
    if (!$from)
        $from = $pun_config['o_board_title'].' '.$lang_common['Mailer'].' <'.$pun_config['o_webmaster_email'].'>';

    // Make sure all linebreaks are CRLF
    $message = str_replace("\n", "\r\n", pun_linebreaks($message));
    $headers = 'From: '.$from."\r\n".'Date: '.date('r')."\r\n".'MIME-Version: 1.0'."\r\n".'Content-transfer-encoding: 8bit'."\r\n".'Content-type: text/plain; charset='.$lang_common['lang_encoding']."\r\n".'X-Mailer: PunBB Mailer';

    if ($pun_config['o_smtp_host'] != '')
        smtp_mail($to, $subject, $message, $headers);
    else
        mail($to, $subject, $message, $headers);
}

The latter is from 1.2.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

3

Re: small problem with forum mailer

It has no effect at all.

So I decided to replace files contained in include/ in order to be sure there was no corruption.
I was right to do that. I don't know why, but all works perfect now.

Thanks otherwise for your help

wink

Re: small problem with forum mailer

Odd. Oh well, it works :)

"Programming is like sex: one mistake and you have to support it for the rest of your life."