SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 21/04/2019, 03:52 PM   #1
XStormiest
Gangsta
 
Join Date: Jun 2012
Location: Continent: Europe, Country: Romania, City: Buzau
Posts: 558
Reputation: 46
Default Weird error when I try to send an email with HTTP function

So I tried to send an email with a php code for an account confirmation, all good untill I type my email then I get this


Edit: Error 400 Bad Request

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

<head>

<title>Bad request!</title>

<link rev="made" href="mailto:postmaster@localhost" />

<style type="text/css"><!--/*--><![CDATA[/*><!--*/ 

    body { color: #000000; background-color: #FFFFFF; }

    a:link { color: #0000CC; }

    p, address {margin-left: 3em;}

    span {font-size: smaller;}

/*]]>*/--></style>

</head>



<body>

<h1>Bad request!</h1>

<p>





    Your browser (or proxy) sent a request that

    this server could not understand.



</p>

<p>

If you think this is a server error, please contact

the <a href="mailto:postmaster@localhost">webmaster</a>.



</p>



<h2>Error 400</h2>

<address>

  <a href="/">localhost</a><br />

  <span>Apache/2.4.33 (Win32) OpenSSL/1.0.2o PHP/5.6.36</span>

</address>

</body>

</html>
What I used to form the link to send
Code:
				format(message, sizeof(message), "Hello %s, this is an email for account confirmation\n.Your Key code is %s", GetUserName(playerid), key);
				for(new i = 0; i < strlen(message); i++)
				    if( message[i] == ' ' )
				        message[i] = '-';
				format(link, sizeof(link), "78.96.226.61/POTOL/vendor/email.php?code=%s&email=%s&message=%s", key, P_Account[playerid][email], message);
				printf("%s", link);
				HTTP(playerid, HTTP_GET, link, " ", "OnConfirmationPending");

				ShowEmailCDialog(playerid);
__________________
XStormiest 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
HTTP function broken? Can't send long strings! linuxthefish Scripting Help 5 13/11/2017 08:31 PM
Error on email send AlexuTzVs Scripting Help 1 06/09/2016 03:42 AM
Send email ScIrUsna Scripting Help 8 17/03/2016 01:35 PM
Email Verification Function (email's integrity) StaticYey Scripting Help 5 26/10/2014 03:35 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 06:06 PM


All times are GMT. The time now is 03:05 PM.


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