Mail problem
#1

Hi. Tried Slice's include, Mailer but it doesn't sends any mail. Here is what it prints:
PHP код:
[00:32:01] Mailer script says: <?php
    ini_set
'html_errors'false );
    
    if ( empty( 
$_POST't' ] ) || empty( $_POST'f' ] ) || empty( $_POST'n' ] ) || empty( $_POST's' ] ) || empty( $_POST'm' ] ) )
        die( 
'Error: Missing parameters.' );
    
    
mail(
        
$_POST't' ],
        
utf8_encode$_POST's' ] ),
        
$_POST'm' ],
        
implode(
            
"\r\n",
            array
            (
                
'From: "' addslashes$_POST'f' ] ) . "\" <{$_POST'n' ]}>",
                
"Reply-To: {$_POST['f']}",
                
"X-Mailer: PHP/" phpversion( ),
            )
        )
    );
?>
[00:32:03] Mailer script says: <?php
    ini_set
'html_errors'false );
    
    if ( empty( 
$_POST't' ] ) || empty( $_POST'f' ] ) || empty( $_POST'n' ] ) || empty( $_POST's' ] ) || empty( $_POST'm' ] ) )
        die( 
'Error: Missing parameters.' );
    
    
mail(
        
$_POST't' ],
        
utf8_encode$_POST's' ] ),
        
$_POST'm' ],
        
implode(
            
"\r\n",
            array
            (
                
'From: "' addslashes$_POST'f' ] ) . "\" <{$_POST'n' ]}>",
                
"Reply-To: {$_POST['f']}",
                
"X-Mailer: PHP/" phpversion( ),
            )
        )
    );
?>
And this is the command:
pawn Код:
YCMD:mail(playerid, params[], help)
{
    #pragma unused params, help
    SendMail("<deleted>", "<not now>", "DiGiTaL AnGeL", "Subiect", "test");
    SendMail("<censored>", "<no>", "DiGiTaL AnGeL", "Subiect", "test");
    SCM(playerid, ROSU, "s");//just for debugging
    return 1;
}
Reply
#2

Do you actually have PHP enabled on your webserver? I don't think it's supposed to output raw PHP code.
Reply
#3

Webserver? I tested it from my pc, and I used the site for mailer.php given by Slice.
Reply
#4

Sigh. That doesn't work! You need to download the mailer.php file and put it on your own webserver that supports PHP. You can't send mail from someone else's mailserver. Much less so because the php file on Slice's server can be viewed in plain text, meaning PHP is not enabled over there.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)