Tekken Posted March 11, 2015 Share Posted March 11, 2015 (edited) Hi guis, i use this useful function sendMailTo for sending an mail from server to someone but is didn't work Thi is my code : function sendMailTo(playerMail, serverMail, headertext, text) callRemote("http://apocalipz.net/recover_php/mail.php", mailsended, playerMail, headertext, text) end function mailsended() outputDebugString("E-Mail was succesfully sended.") end function MailText ( player, cmd, playerMail, serverMail, headertext, ... ) if playerMail then if headertext then local text = table.concat({...}," ") if text then sendMailTo(playerMail, serverMail, headertext, text) end end end end addCommandHandler("send", MailText) No error given in /debigscript 3 and this is the php: <?php include ( "mta_sdk.php" ); $input = mta::getInput(); mail($input[0], $input[2], $input[3], "From: ".$input[1]."\n" . "Content-Type: text/html; charset=iso-8859-1\n"); ?> I am not so good at php so.... Edited March 20, 2015 by Guest Link to comment
JR10 Posted March 11, 2015 Share Posted March 11, 2015 Does mailsended get called? Are you sure you uploaded the mta_sdk.php file and it's in the same directory? Try to debug the php file by running it from the browser. Link to comment
Tekken Posted March 11, 2015 Author Share Posted March 11, 2015 Yes mailended is called but i didn't get any mail... and yes mta_sdk.php and mail.php are in the same directory Link to comment
xXMADEXx Posted March 11, 2015 Share Posted March 11, 2015 It could be the webserver. Some common issues would be: - THe server doesn't support have a mail server - The mail server is registered temporarily registered as spam due to a lot of emails being sent Link to comment
Tekken Posted March 12, 2015 Author Share Posted March 12, 2015 It could be the webserver. Some common issues would be: - THe server doesn't support have a mail server - The mail server is registered temporarily registered as spam due to a lot of emails being sent I am not sure, but i think i didn't have an mail server, wath is that and how can i make one ? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now