SA-MP Forums Archive
Mailing problem. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Mailing problem. (/showthread.php?tid=581393)



Mailing problem. - b3nz - 12.07.2015

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:

Код:
#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");
}
and as I said, I edited the code a little bit for debugging.

Код:
<?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!';  	
?>



Re: Mailing problem. - liquor - 12.07.2015

I'd say there's a chance of the mail being sorted out as spam...


Re: Mailing problem. - b3nz - 12.07.2015

Forgot to mention that I checked all the folders possible. :/