I am trying to transfer multiple images through the built-in Mailgun API. I have no problem with just one image, but when I try to use multiple images - as in the code below, the message displays only the last image in the array.
$template = View::make('emails.template')->render(); $result = $mgClient->sendMessage($domain, array( 'from' => $sender, 'to' => implode(',',$emailAddresses), 'subject' => '%recipient.subject%', 'text' => $messageText, 'recipient-variables' => json_encode($credentials), 'html' => $template ), array( 'inline' => array( 'path/to/image1.png', 'path/to/image2.png', 'path/to/image3.png', 'path/to/image4.png') ));
The above code works as if the last element in the array is the only element.
The documentation for sending inline images with Mailgun is here , and she said here that โyou can post multiple inline values,โ which means that I'm definitely doing something wrong.
source share