[Include] C_Mail
#1

- C_Mail
~ After a lot of requests i decided to make an simple but effective Mail script.
~ No plugins needed.
~ Only tested on Debian 5.
~ Simple and smooth. Does exactly what it should .. Nothing more Nothing less.

Link(s):
~ Pastebin - Include.v.1.2
~ Pastebin - Php file.v.1.1

How to:
~ Upload the php script to your host.
~ Edit the include file to match your host.
~ Put the include file inside '/pawno/include'.
~ Add the include to your gm by : '#include <c_mail>'.
~ Enjoy.

Editing the include:
Look into the include and look for the 'SendMail' Stock, and the format part, you will see theres 'localhost/index.php' this would be the path to were you uploaded your script Ex: sa-mp.com/index.php. Edit it to match your host.
Code:
pawn Код:
stock SendMail(reciever[], sender[], subject[], message[])
{
    new string[128];
    format(string, sizeof(string), "localhost/index.php?sender=%s&reciever=%s&subject=%s&message=%s",sender,reciever,subject,message);
    HTTP(1, HTTP_GET, string, "", "MailResponse");
}

That's it.

Creditz:
~ g_aSlice.
~ SA-MP dev team.
~ Me .
Can't get it working? write an reply and let me know about your problem.
Reply
#2

Wow, Looks good
Reply
#3

Quote:
Originally Posted by -Luis
Посмотреть сообщение
Wow, Looks good
Thanks, simple and smooth. Does exactly what it should .. Nothing more Nothing less.
Reply
#4

Nice, I seen something like this last month too. Also been seeing a lot of requests too.
Reply
#5

Quote:
Originally Posted by willsuckformoney
Посмотреть сообщение
Nice, I seen something like this last month too. Also been seeing a lot of requests too.
Could you link me please? I searched around couldn't find anything but request's.
Reply
#6

Nice Include.
Reply
#7

You really should remove that hosted php file by you, it's extremely easy abusable to send spam e-mails and your IP will be blacklisted.

Other than that, there's already an include doing the same thing. Can't find it right now either ..
Reply
#8

Quote:
Originally Posted by exora
Посмотреть сообщение
You really should remove that hosted php file by you, it's extremely easy abusable to send spam e-mails and your IP will be blacklisted.

Other than that, there's already an include doing the same thing. Can't find it right now either ..
Not hosted by me at all
I'll also in an future version make the PHP script safer.
Reply
#9

Wow this is a really interesting way to use that HTTP function nice job.
Reply
#10

looks good.
Reply
#11

Look good.
Reply
#12

Quote:
Originally Posted by BLAbla93
Посмотреть сообщение
Wow this is a really interesting way to use that HTTP function nice job.
Quote:
Originally Posted by Haji
Посмотреть сообщение
looks good.
Quote:
Originally Posted by Aleluja
Посмотреть сообщение
Look good.
Thanks all !! i will sooner or later update to prevent abusing.
Reply
#13

Awesome, nice work...i'll use it
Reply
#14

This is pretty neat man, good work!
Reply
#15

Quote:
Originally Posted by Brian_Furious
Посмотреть сообщение
Awesome, nice work...i'll use it
Quote:
Originally Posted by RealCop228
Посмотреть сообщение
This is pretty neat man, good work!
Thanks, both of you !! Any suggestions?
Reply
#16

Didn't you make this because someone was put a topic about it? :S

Nice though.
Reply
#17

Quote:
Originally Posted by [FU]Victious
Посмотреть сообщение
Didn't you make this because someone was put a topic about it? :S

Nice though.
Yeah, iv'e seen a lot of requests for a mail script.. sa-mp forums is flooded by threads requesting a mail script.. so i decided to make one

This simple but yet effective script could also teach you how to use the http function.
Reply
#18

Quote:
Originally Posted by Cameltoe
Посмотреть сообщение
Yeah, iv'e seen a lot of requests for a mail script.. sa-mp forums is flooded by threads requesting a mail script.. so i decided to make one

This simple but yet effective script could also teach you how to use the http function.
Very good though, I will be using.
Reply
#19

Quote:
Originally Posted by [FU]Victious
Посмотреть сообщение
Very good though, I will be using.
Great tell me what you think, and maybe add some suggestions?
Reply
#20

yo,
Good job on this. You should, hoever, encode the incoming data to avoid any issues (for example, using the ampersand (&) could cause havoc.).
I made this function for you:

pawn Код:
stock EncodeURL( szString[ ], iSize = sizeof( szString ) )
{
    for ( new i = 0, l = strlen( szString ); i < l; i++ )
    {
        switch ( szString[ i ] )
        {
            case '!', '(', ')', '\'', '*',
                 '0' .. '9',
                 'A' .. 'Z',
                 'a' .. 'z':
            {
                continue;
            }
           
            case ' ':
            {
                szString[ i ] = '+';
               
                continue;
            }
        }
       
        new
            s_szHex[ 8 ]
        ;
       
        if ( i + 3 >= iSize )
        {
            szString[ i ] = EOS;
           
            break;
        }
       
        if ( l + 3 >= iSize )
            szString[ iSize - 3 ] = EOS;
       
        format( s_szHex, sizeof( s_szHex ), "%02h", szString[ i ] );
       
        szString[ i ] = '%';
       
        strins( szString, s_szHex, i + 1, iSize );
       
        l += 2;
        i += 2;
       
        if ( l > iSize - 1 )
            l = iSize - 1;
    }
}
Simply run any incoming strings through that. Make sure you have enough space in the array, though.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)