Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'vendor/autoload.php';
- use MailgunMailgun;
- $mgClient = new Mailgun("key-383471b46ed52cc69baa3eea9ba1bf2d");
- $domain = "sandboxfa3e9009746840be831c6edc9e9f1ee9.mailgun.org";
- $result = $mgClient->sendMessage("$domain",
- array('from' => 'Mailgun Sandbox - Test
- <postmaster@sandboxfa3e9009746840be831c6edc9e9f1ee9.mailgun.org>',
- 'to' => 'email_1@gmail.com, email_2@gmail.com',
- 'subject' => 'Mailgun bulk-msg test for KB',
- 'text' => 'Your mail do not support HTML',
- 'html' => 'html-portion here...',
- 'recipient-variables' => '{"email_1@gmail.com": {"first":"Name-1",
- "id":1}, "email_2@gmail.com": {"first":"Name-2", "id": 2}}')
- );
- var_dump($result);
- ?>
- #===============================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement