1
我目前正在使用亚马逊为我正在构建的Web应用程序发送电子邮件。我使用的代码是:http://www.arrow-web.co.uk/blog/2014/12/sending-raw-email-ses发送电子邮件。但是,我无法看到发送内嵌附件的方法,到目前为止(所有页脚图像存储在一个文件夹中),图像附加到电子邮件,但不以内联方式显示。我以前没有写过原始邮件,但我不知道将这些图像内嵌的最好方法:使用内联附件
$attachments = array(
$file_to_attach
);
if ($handle = opendir("$footerImages")) {
$footerClose = "<br><br>"; // Drop down images on to new line
while (false !== ($entry = readdir($handle))) {
if(($entry==".")||($entry=="signature")||($entry=="..")){} // Ignore .. and .
else{
array_push($attachments, "$footerImages$entry");
// Build footer image information
$footerClose .= "<img alt='$entry' src='cid:$entry'/>";
}
}
}