drupal_mail 함수 (D7)를 사용하여 HTML 전자 메일을 생성하려고하는 사용자 지정 모듈이 있습니다. 메일이 전송되고 심지어 text/html이 표시되기도하지만 HTMl이받은 편지함으로 들어가기 전에 어딘가에서 HTMl을 제거하는 것으로 보입니다.Drupal 7 drupal_mail이 HTML을 제거하고 있습니까?
첫째, 함수에서 내 타이틀/몸/기타 바르 짓고 있어요 및 사용자 정의 함수로 전송 :
$body = "We thought you'd like to know that ".$fullname." has marked your project as completed.
<br /><br />
Please visit the link at <a href='http://".$_SERVER['HTTP_HOST']."/survey/customer/".$customer[0]->unique_id."'>http://".$_SERVER['HTTP_HOST']."/survey/customer/".$customer[0]->unique_id."</a> to take the survey.";
$returnMail = latch_send_mail('pro_realized',$customer[0]->customer_email,$user->mail,$title,$body);
그리고 내가 가지고있는 latch_mail latch_send_email 기능 :
function latch_mail($key, &$message, $params) {
$headers = array(
'MIME-Version' => '1.0',
'Content-Type' => 'text/html; charset=UTF-8; format=flowed',
'Content-Transfer-Encoding' => '8Bit',
'X-Mailer' => 'Drupal'
);
foreach ($headers as $key => $value) {
$message['headers'][$key] = $value;
}
$message['body'][] = $params['body'];
$message['subject'] = $params['subject'];
}
및
function latch_send_mail($key,$to,$from,$title,$body,$headers='') {
$params['body']=$body;
$params['subject'] = t($title);
return drupal_mail('latch', $key, $to, language_default(), $params, $from,TRUE);
}
이메일에 내 태그 및 br 태그가 올 것으로 예상되지만, 우 같은 :
We thought you'd like to know that John Doe has marked your project as completed. Please visit the link at http://latch.local/survey/customer/34c91b8883cd70b32c65feb7adf9c393 [1] to take the survey. [1] http://latch.local/survey/customer/34c91b8883cd70b32c65feb7adf9c393
어떻게 든 내 링크를 복용하고 완전히 BR 태그를 제거하는 동안 각주로 돌고
.제공 할 수있는 도움을 주시면 감사하겠습니다. 감사!