jgl*_*mne 5 php inline laravel mailgun
我试图通过Mailgun的内联API参数传递多个图像.我只有一个图像没问题,但是当我尝试使用多个图像时 - 如下面的代码所示 - 只有数组中的最后一个图像显示在电子邮件中.
$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')
));
Run Code Online (Sandbox Code Playgroud)
上面的代码就好像数组中的最后一个元素是唯一的元素一样.