Php 如何使用Mandrill发送图像,但图像名称不应重命名?

Php 如何使用Mandrill发送图像,但图像名称不应重命名?,php,phpmailer,mandrill,Php,Phpmailer,Mandrill,mandrill api中的图像文件附件工作正常。但是在这里 'type' => 'image/jpeg', 'name' => "", // Here I didn't know what I am use 'content' => base64_encode(file_get_contents($img)) 你可以这样做 'name' => basename($img) 如果不想重命名图像 希望这有帮助

mandrill api中的图像文件附件工作正常。但是在这里

'type' => 'image/jpeg',
'name' => "",     // Here I didn't  know what I am use 
'content' => base64_encode(file_get_contents($img))

你可以这样做

'name' => basename($img)
如果不想重命名图像

希望这有帮助