aujiz11/samp-mail-include
Includes an API that allows you to send HTTP requests to send emails to players.
Este repositório não tem arquivo de licença. Ele é público para leitura, mas isso sozinho não dá permissão para reutilizar.
Instalar com o sampctl
sampctl package install aujiz11/samp-mail-include
Execute na pasta do seu projeto. O sampctl baixa o pacote e as dependências dele.
Adiciona os arquivos de include dele, com as bibliotecas de que depende, ao compilador Pawn no seu navegador, prontos para incluir num script.
README.md
samp-mail-include
Installation
Simply install to your project:
sampctl package install aujiz11/samp-mail-include
Include in your code and begin using the library:
#include <mail>
Important:
You need to put mail.php in the host then define the URL leading to it in the game script!
Usage
The main function for sending emails is Mail_Send. Here's the function syntax and parameters:
Mail_Send(playerid, const function[], const to[], const additional_headers[], const subject[], const message[], type = MAIL_TYPE_NORMAL)
Parameters
playerid: The ID of the player sending the emailfunction[]: Callback function name that will be called when the email is sentto[]: Recipient's email addressadditional_headers[]: Additional email headers (optional)subject[]: Email subject linemessage[]: Email body contenttype: Email type (default: MAIL_TYPE_NORMAL)MAIL_TYPE_NORMAL: Plain text emailMAIL_TYPE_HTML: HTML formatted email
Example Usage
public OnPlayerConnect(playerid)
{
Mail_Send(playerid, Mail:MAIL_FUNC, "[email protected]", "MAIL Name", "Send Mail Test", "Test");
}
Mail_Response:MAIL_FUNC(playerid, response_code, const data[]) {
switch (response_code) {
case 200: {
// success
}
default: {
// error
}
}
printf(data);
}
Testing
To test, simply run the package:
sampctl package run
Esta página é montada com o que o GitHub publica sobre o repositório. O samp.directory não hospeda o código. Avisar de um problema com esta página