Class SenderMailgun in PHP


Class PHP criada para envio simples de email via API Mailgun
O usuário deve cadastrar seu domínio dentro da plataforma mailgun e assim gerando os valores de DNS records que será cadastrada em sua zona DNS.

Verifying Your Domain

https://documentation.mailgun.com/en/latest/user_manual.html#verifying-your-domain
Access Your Domains
Access Your Private API Key
Implementation Code
require_once('SenderMailgun.php');

# Open file key
$key = file_get_contents('key');

# Instantiate the client.
SenderMailgun::$api_key = $key;

# Data params email.
$params = [
  'from'=> 'Your Name ',
  'to'=>'your-client@gmail.com',
  'subject'=>'Your subject',
  'html'=>'Black Friday!!!'
];

# Action sender.
SenderMailgun::send_mail('marketing.imaginarionerd.com.br',$params);
print_r(SenderMailgun::$result_send);
exit();

https://gist.github.com/MrCl0wnLab/9e4cffb881a80ee06d3fd23c39a38ccb.js

Video

Result:
Email:
Class PHP:
https://github.com/MrCl0wnLab/SenderMailgun

Comentários

Postagens mais visitadas deste blog

Nova versão do Scanner INURLBR!

OSINT: Buscando Chaves API de Google Maps usando Google Hacking

Scan IP Checker CVE-2020-5902