Advertisement
Guest User

Untitled

a guest
Jul 26th, 2017
504
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. require 'vendor/autoload.php';
  2. use MailgunMailgun;
  3.  
  4. $mgClient = new Mailgun("key-383471b46ed52cc69baa3eea9ba1bf2d");
  5. $domain = "sandboxfa3e9009746840be831c6edc9e9f1ee9.mailgun.org";
  6. $result = $mgClient->sendMessage("$domain",
  7. array('from' => 'Mailgun Sandbox - Test
  8. <postmaster@sandboxfa3e9009746840be831c6edc9e9f1ee9.mailgun.org>',
  9. 'to' => 'email_1@gmail.com, email_2@gmail.com',
  10. 'subject' => 'Mailgun bulk-msg test for KB',
  11. 'text' => 'Your mail do not support HTML',
  12. 'html' => 'html-portion here...',
  13. 'recipient-variables' => '{"email_1@gmail.com": {"first":"Name-1",
  14. "id":1}, "email_2@gmail.com": {"first":"Name-2", "id": 2}}')
  15. );
  16. var_dump($result);
  17. ?>
  18. #===============================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement