Image 无法使SwiftMailer成功发送HTML嵌入的EDD图像

Image 无法使SwiftMailer成功发送HTML嵌入的EDD图像,image,swiftmailer,mailer,Image,Swiftmailer,Mailer,当我向电子邮件中添加图像时,SwiftMailer会通知它已发送,但我在收件箱中看不到它,也没有PHP错误 另一方面,如果没有图像,HTML将成功发送到我的收件箱。当我从HTML消息中剥离标签并发送时,我会在收件箱中单独获取图像 我已经处理这个问题大约3天了,一直在研究一个可行的解决方案,但没有结果。任何帮助都将不胜感激 谢谢 require_once 'Swift_Mailer/swift_required.php'; $message = Swift_Message::newInstance

当我向电子邮件中添加图像时,SwiftMailer会通知它已发送,但我在收件箱中看不到它,也没有PHP错误

另一方面,如果没有图像,HTML将成功发送到我的收件箱。当我从HTML消息中剥离标签并发送时,我会在收件箱中单独获取图像

我已经处理这个问题大约3天了,一直在研究一个可行的解决方案,但没有结果。任何帮助都将不胜感激

谢谢

require_once 'Swift_Mailer/swift_required.php';
$message = Swift_Message::newInstance(); 
$img1 = $mail->embed( Swift_Image::fromPath( IMGFILEPATH . "img1.png" ));
$img2 = $mail->embed( Swift_Image::fromPath( IMGFILEPATH . "img2.png" ));
$subject = "To Whom It May Concern.";
$msg = "<body><div style='background:#002211; padding:10px;'><a href='" . $url . "'     target='_BLANK'><img src='" . $img1 . "' id='image1' class='BORDERZERO' alt='GC' />     <img src='" . $img2 . "' id='image2' class='BORDERZERO' alt='General Collections     Box.' /></a></div>";
$msg .= "<hr style='color:#555555; height:1px; background:#777777; vertical-        align:top;'/><div style='padding:10px; background:#777777; color:#000000;'>";
$msg .= "<span>Hello,<br /><br />We would like to say thank you for donating to our     collections box.<br /><br />The General Collections Box.<br />
$msg .= "<hr style='color:#555555; height:2px;' />";
$msg .= "If you believe that this message was sent to you in error or that you are not      the intended recipient, please simply discard and disregard it. Thank you for     your cooperation. - GBC.<br /></span></div></body>";
$message->setSubject( $subject )->setFrom( array( $sender  => $sender_name ))
    ->setTo( array( $recipients ))->setBody( $html, "text/html" )
    ->addPart( strip_tags( $html ), "text/plain" )->setPriority( 2 )
->setReadReceiptTo( "$sender" );
if( !MMCS_Service::getSwiftMailer()->send( $mail, $failures )){
   var_dump( $failures ); 
   exit( 0 );
}