Created
April 16, 2020 01:23
-
-
Save MrCl0wnLab/9e4cffb881a80ee06d3fd23c39a38ccb to your computer and use it in GitHub Desktop.
Exemplo de uso Class PHP criada para envio simples de email via API Mailgun
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
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 <you@maketing.your.ecommerce.br>', | |
'to'=>'your-client@gmail.com', | |
'subject'=>'Your subject', | |
'html'=>'<h1>Black Friday!!!</h1>' | |
]; | |
# Action sender. | |
SenderMailgun::send_mail('marketing.imaginarionerd.com.br',$params); | |
print_r(SenderMailgun::$result_send); | |
exit(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Class SenderMailgun in PHP
https://blog.mrcl0wn.com/2020/04/class-sendermailgun-in-php.html