[PROBLEM] HTTP returns 6 (ERROR_HTTP_MAILFORMED_RESPONSE)
#1

EDIT: Maybe I see it... Wait a minute, please.
EDIT 2: WTF now it gives an 404 error... the site IS workin'!

The title says it, My mail function isn't working.
I don't know why :/ Here's my script

PHP Code
PHP код:
<?php
        
if($_SERVER['REMOTE_ADDR'] != '94.23.146.148') exit;
    if(!isset(
$_GET['mailaddr']) && !isset($_GET['mailcont'])) exit;
    
mail($_GET['mailaddr'], "Mafia World : RP"$_GET['mailcont']);
?>
(Yes I'm sure that the IP is 94.23.146.14

PAWN Code
pawn Код:
func:PlayerSendMail(playerid, mail[], mailcontent[])
{
    new mailstring[500], siteurl[5000];
    format(mailstring, 500, "** Mail from %s - Server RLRP ([url]www.rl-rp.com):\n\n----------\n\n%s\n\n\nPlease[/url] send a mail to contact@rl-rp.com if you think this is spam.\n\nKind Regards,\nRL-RP team", PlayerName[playerid], mailcontent);
    format(siteurl, 5000, "www.mafia.rl-rp.com/functions/mail.php?mailaddr=%s&mailcont=%s", mail, mailstring);
    HTTP(playerid, HTTP_POST, siteurl, mailstring, "SendMail");
    return 1;
}

CB:SendMail(index, response_code, data[])
{
    new str[50];
    if(response_code != 200){
        format(str, 50, "ERROR CODE: %d", response_code);
        SendClientMessage(index, COLOR_RED, str);
        return 1;
    }
    return 1;
}
It always gives error code 6.

Thanks, already, for your help.

- Kevin
Reply
#2

list all of your error's
Reply
#3

Ehm, that're the only errors. Code 6 is over now, the next prob is that it's giving a 404 error (standard webhost error; page not found)
But that's just impossible, 'cuz it DOES exists :S
Reply
#4

You aren't escaping the contents you're sending - this can cause a malformed request leading to confusion in the SA-MP native causing it to request something completely different from what you wanted.

You might want to check out My mailer include.
Reply
#5

Thanks Slice, I ever saw that include but I couldn't find it anymore in search function. Also, I didn't know anymore who made it, so I tried to make my own. But it was you that made it :')
Thank you.

- Kevin
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)