2 回答

TA貢獻(xiàn)1813條經(jīng)驗(yàn) 獲得超2個贊
嵌入應(yīng)該可以正常工作
<?php
$message = new Swift_Message('Your subject');
$message->setBody(
'<html>' .
' <body>' .
' <img src="' . $message->embed(Swift_Image::fromPath('image.png')) . '" />' .
' </body>' .
'</html>',
'text/html'
);
?>

TA貢獻(xiàn)1982條經(jīng)驗(yàn) 獲得超2個贊
您需要將徽標(biāo)圖像作為附件包含在電子郵件中。google 搜索時,
$uploadedFileName = CUploadedFile::getInstance($model,'career_resume');?
$uploadedFileName = $uploadedFile->tempName; // will be something like 'myfile.jpg'
$swiftAttachment = Swift_Attachment::fromPath($uploadedFileName);
$message->attach($swiftAttachment);
還谷歌如何在 Swiftmailer 中嵌入圖像。
- 2 回答
- 0 關(guān)注
- 159 瀏覽
添加回答
舉報(bào)