SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 15/04/2019, 11:08 AM   #1
XStormiest
Gangsta
 
Join Date: Jun 2012
Location: Continent: Europe, Country: Romania, City: Buzau
Posts: 546
Reputation: 45
Default Email confirmation script.

I'm trying to make an email confirmation for my script
Here is the php code in my xampp server

The problem is that whatever I"m doing the email is not being sent...
Code:
<?php

	if( isset( $_GET['code'] ) )
	{
		$code = $_GET['code'];
		$email = $_GET['email'];
		$message = $_GET['message'];
		if( isset( $email) && !empty($email) )
		{
			if( isset($message) && !empty($message) )
			{
				$message = str_replace("-", " ", $message);
				mail($email, "Email confirmation", $message, "From \" Project Omega: Tales of Life \" <potol@samp.com>\r\n", "X-Mailer" . phpversion());
			}
		}
	}

?>
And here are the functions and lines that relates to it.
Code:
Public:EmailDelivered(playerid, response, data[])
{
	new buffer[128];
	if(response == 200)
	{
	    SendClientMessage(playerid, COLOR_WHITE, "[ACC] Email has been succesfully delivered!");
	}
	else
	{
	    format(buffer, sizeof(buffer), "Error: %s", data);
	    SendClientMessage(playerid, COLOR_WHITE, "[ACC] Email failed to deliver...");
	}
}
Code:
new text[256];
format(P_Account[playerid][email], 40, "%s", inputtext);
format(text, sizeof text, "78.96.226.61/POTOL/email.php?code=%s&email=%s&message=This-is-a-message-generated-by-the-server.Hello-%s-Your-key-is-%s-.", key, P_Account[playerid][email],GetUserName(playerid), key);
HTTP(playerid, HTTP_GET, text, " ", "EmailDelivered");
__________________

Last edited by XStormiest; 15/04/2019 at 12:15 PM.
XStormiest is offline   Reply With Quote
Old 16/04/2019, 09:22 AM   #2
XStormiest
Gangsta
 
Join Date: Jun 2012
Location: Continent: Europe, Country: Romania, City: Buzau
Posts: 546
Reputation: 45
Default Re: Email confirmation script.

So..nobody knows how to that?
__________________
XStormiest is offline   Reply With Quote
Old 16/04/2019, 11:37 AM   #3
Marshas
Little Clucker
 
Join Date: Apr 2017
Posts: 37
Reputation: 0
Default Re: Email confirmation script.

Try to access this:
78.96.226.61/POTOL/email.php?code=%s&email=%s&message=This-is-a-message-generated-by-the-server.Hello-%s-Your-key-is-%s
Directly from chrome, pasting it in url. Php error should appear if there any.
Next thing, put your php script into /var/www/html direction of your vps server, then you will be able to access it, because now, I tried to access that file, but I can't.
Marshas is offline   Reply With Quote
Old 20/10/2019, 03:03 PM   #4
GeorgeLimit
Big Clucker
 
GeorgeLimit's Avatar
 
Join Date: Mar 2018
Location: Anywhare
Posts: 91
Reputation: 0
Default Re: Email confirmation script.

You need webhost to host your mail SMTP.
__________________
GeorgeLimit is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
User confirmation SapMan Scripting Help 2 25/12/2018 05:43 PM
[Tutorial] How to create a email confirmation system bruxo00 Tutorials 5 17/06/2018 02:12 PM
Email Verification Function (email's integrity) StaticYey Scripting Help 5 26/10/2014 04:35 AM
Confirmation email. ZeQualX Scripting Help 1 07/02/2014 05:14 AM
Email chat on server? So you send a email to a forwarded email that send the message in the sa-mp server Frede Server Support 4 04/02/2013 07:06 PM


All times are GMT. The time now is 04:20 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.