1 (edited by isatis39871 2006-02-19 17:29)

Topic: [resolved] Special mail function

Hello,

I had a look on the forum but found nothing about that...

I can't use the PHP mail() function on this server, it's not activated. I asked the admin, he gave me only the right to use his own function : mail_php("adresse_mail_destination","Votre adresse teria",$contenu,"Le sujet du mail");
It seems you don't need to specify the smtp adressa and returns 1 if success

The function works perfectly in a form, but the problem  is with the forum:

But I saw in the code that PunBB uses the mail() function, so I can't use the maling-list and the maling password check features. I tried to modify the source code but  I am a newbie in PH and it didn't work.

Do you have any idée to fiddle with it ?

2 (edited by Nibbler(cpg) 2006-02-19 16:46)

Re: [resolved] Special mail function

include/email.php

Find

mail($to, $subject, $message, $headers);

Change to

mail_php($to, $from, $message, $subject);

Also change this code

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

to

    // Default sender/return address
    if (!$from) $from = $pun_config['o_webmaster_email'];

Might be other issues with the from address...

3 (edited by isatis39871 2006-02-19 17:28)

Re: [resolved] Special mail function

Thanks, I gonna try that !

// EDIT : it worked perfectly. At the begining it didn't, but because my test address was already set. You can't use the same address for two accounts, it's logic, but I didn't notice it before.

Thanks again