12.07.2015, 18:29
sup.
so I tried to use Slice's mailing include and it didn't go very well. The .php file debugs that the mail was sent succesfully, but there's no new mail messages in the email Im trying to send a mail. I'm trying this on localhost (using XAMPP for Apache server), and yes, I can access the .php file through browser.
Test code:
and as I said, I edited the code a little bit for debugging.
so I tried to use Slice's mailing include and it didn't go very well. The .php file debugs that the mail was sent succesfully, but there's no new mail messages in the email Im trying to send a mail. I'm trying this on localhost (using XAMPP for Apache server), and yes, I can access the .php file through browser.
Test code:
Код:
#define MAILER_URL "localhost/mailer/mailer.php" #include <a_samp> #include <mailer> public OnFilterScriptInit( ) { SendMail ("my_email [changed]", "my_email [changed]", "TEST", "TEST", "test message"); }
Код:
<?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.' ); $isSent = 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( ), ) ) ); if($isSent) echo 'Mail was accepted for delivery!'; else echo 'Mail was not accepted for delivery!'; ?>