after failed to find a solution for my problem in the mailgun documentation, I will explain what I\'m looking for.
Today I\'m using phpList to send out my newsletter (It
I have used external html template in this way. It may be help you.
$html = file_get_contents('my_template.html'); // this will retrieve the html document
and then:
$result = $mgClient->sendMessage("$domain",
array('from' => 'My Business Name ',
'to' => 'name-1@gmail.com, name-3@gmail.com, name-3@gmail.com',
'subject' => 'Issue Feb 2014',
'text' => 'Your mail do not support HTML',
'html' => $html,
'recipient-variables' => '{"name-1@gmail.com": {"first":"Name-1", "id":1}, "name-2@gmail.com": {"first":"Name-2", "id": 2}}'),
array('inline' => 'Pad-Thai-1.jpg'));
Check this line:
'html' => $html,