[Include] SendMail
#1

Introduction

Hello Guys, this is my include with only one function: SendMail
This include was made using a_http and use a PHP Script hosted for me.
If you need, you can get PHP Script Here.

How to use


To use, you need put this in top of your script:
pawn Код:
#include <SendMail>
and use the function SendMail.

Params:
SendMail(Email(To),Subject,Email(From),Message);
I've tested this script with hotmail and gmail, but it's worth mentioning that, in the case the email isn't delivered, you should check the Spam Box.

Download


Credits


SA-MP TeamPast/Present/Future
Gustavo AraъjoInclude
Jonathan FeitosaIdea and host the PHP fileІ
Any bugs? Contact-me.
Reply
#2

Great!
Reply
#3

Nice
Reply
#4

Getting errors when I compile it?
Reply
#5

Any benchmarks? And how is it better from this one?
Reply
#6

Quote:
Originally Posted by goviscrap
Посмотреть сообщение
Getting errors when I compile it?
what error?

Quote:
Originally Posted by Ballu Miaa
Посмотреть сообщение
Due to simplicity, mine gets being the faster, however, his code is better, moreover, i didn't even know about this way.
Reply
#7

can i use \n
Reply
#8

Quote:
Originally Posted by dr.lozer
Посмотреть сообщение
can i use \n
currently, no.
Reply
#9

This is my version,xD:
pawn Код:
stock SendMail(to[],asunto[],mensaje[],from[])
{
    new Link[1200];
    format(Link,sizeof(Link),"adri1servers.com.ar/mailer.php?code=44514&to=%s&asunto=%s&msg=%s&from=%s",to,asunto,mensaje,from);
    for(new c; c < strlen(Link)+1; c++)
    {
         if(Link[c] == ' ') Link[c] = '+';
    }
    HTTP(0, HTTP_POST, Link, "", "");
    return 1;
}
this is tested
example:
pawn Код:
SendMail("adri223@hotmail.es","Mensaje enviado desde SA:MP Server","Este mensaje fue enviado desde un servidor de SA:MP","adri1@dontrepply.com");
Reply
#10

Quote:
Originally Posted by adri1
Посмотреть сообщение
This is my version,xD:
pawn Код:
stock SendMail(to[],asunto[],mensaje[],from[])
{
    new Link[1200];
    format(Link,sizeof(Link),"adri1servers.com.ar/mailer.php?code=44514&to=%s&asunto=%s&msg=%s&from=%s",to,asunto,mensaje,from);
    for(new c; c < strlen(Link)+1; c++)
    {
         if(Link[c] == ' ') Link[c] = '+';
    }
    HTTP(0, HTTP_POST, Link, "", "");
    return 1;
}
this is tested
example:
pawn Код:
SendMail("adri223@hotmail.es","Mensaje enviado desde SA:MP Server","Este mensaje fue enviado desde un servidor de SA:MP","adri1@dontrepply.com");
Maybe i will use this: But adri what does line it about? The Mailing server which is sending the mail?

pawn Код:
format(Link,sizeof(Link),"adri1servers.com.ar/mailer.php?code=44514&to=%s&asunto=%s&msg=%s&from=%s",to,asunto,mensaje,from);
How it will effect if i will change it!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)