형식이 지정된 HTML 및 이미지를받는 사람에게 전자 메일로 보내는 스크립트 작업 중입니다. MIME :: Lite를 사용하여 CSS 파일과 첨부 파일로 사용하는 이미지 파일을 보내는 방법을 알아 냈습니다. 이미지는 메일 메시지의 끝에 첨부 파일로 제공됩니다. 다음 줄이 작동하는 것으로 보입니다.CSS에 사용 된 이미지 파일에 대해 cid : attachmentID를 전자 메일에 사용하는 구문은 무엇입니까
<link href="cid:style.css" rel="stylesheet" type="text/css" />
제 질문은 style.css 파일의 다음 줄에 대한 구문이어야합니다. 다음은 작동하지 않습니다.
body {
background-image:url("cid:bgLine.png");
background-repeat:repeat-x;
}
또한 메일 클라이언트가 이미지를 표시하지 않게하려면 어떻게해야합니까? 내가 사용하고 스크립트는 다음과 같습니다
my $msg = MIME::Lite->new(From =>"from\@company\.com",
To => "to\@company\.com",,
Subject =>"Action Required",
Disposition =>'inline',
Type =>'multipart/related');
$msg->attach(Type => 'text/html', Data => qq{@htFileContents});
$msg->attach(Type => 'text/html', Id => $cssFileName, Data => qq{@cssFileContents});
$msg->attach(Type => 'image/png', Id => $imageFile, Path => $imageFile);
$msg->send("sendmail","/usr/sbin/sendmail -t");
는 CSS 또는 HTTP 서버에서 이미지 파일에 대한 URL이 옵션을 선택하지 않습니다 메일 클라이언트 액세스를 가졌어요. 전자 메일은 자체 포함되어야합니다. 구문을 보여주는 예제는 TIA를 참조하십시오.