SA-MP Forums

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

Thread Tools Display Modes
Old 21/04/2019, 03:52 PM   #1
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

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


<html xmlns="" lang="en" xml:lang="en">


<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;}




<h1>Bad request!</h1>


    Your browser (or proxy) sent a request that

    this server could not understand.



If you think this is a server error, please contact

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


<h2>Error 400</h2>


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

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



What I used to form the link to send
				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), "", key, P_Account[playerid][email], message);
				printf("%s", link);
				HTTP(playerid, HTTP_GET, link, " ", "OnConfirmationPending");

XStormiest is offline   Reply With Quote

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 02:56 PM.

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