Sending email to player - 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: Sending email to player (
/showthread.php?tid=622678)
Sending email to player -
ax1 - 25.11.2016
Okay, so I have no clue about php, hosts and such, can someone give me tutorial that will teach me from A to Z how to send an email to player?
Re: Sending email to player -
Abagail - 25.11.2016
The first thing you'll need to do is set up some type of web host(if you're using a VPS and not a proper web host, you can install something such as XAMPP). I'm not going to go super in depth into the actual PHP script, but you'll want to use the
mail function.
PHP код:
bool mail ( string $to , string $subject , string $message [, string $additional_headers [, string $additional_parameters ]] )
There are two ways of interacting with the PHP script. You can either use the
Socket Plugin or the
HTTP function. With both methods, you'll basically be sending data to the PHP script where the PHP script then processes the data and uses the mail function to send the email. There's already plenty of topics about this on these forums alone, you can check these out for more in depth help:
Also:
How to use the Socket Plugin with PHP:
http://forum.sa-mp.com/showthread.ph...70#post1800970