-1
양식 제출시 전자 메일을 보내려는 고객에게 보내려하지만 작동하지 않습니다. 이메일에 html 태그가 표시됩니다.이메일 템플릿이 깨졌습니다. HTML 태그 표시
템플릿 :
<!doctype html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div>
<h1>New Tour Request</h1>
<hr>
<b> Registration For:</b> {{ tour_name|default('N/A')|escape }} <br>
<h3> Total Adults:</h3> {{ adult_passengers|default('N/A')|escape }} <br>
{% if(adult_passengers > 0) %}
{% for i in 1 .. adult_passengers %}
<b>First Name:</b> {{ adult_first_name[i-1]|default('N/A')|escape }}<br>
<b>Last Name:</b> {{ adult_last_name[i-1]|default('N/A')|escape }}<br>
{% endfor %}
{% endif %}
<h3>Total Children:</h3> {{ child_passengers|default('N/A')|escape }}<br>
{% if(child_passengers > 0) %}
{% for i in 1 .. child_passengers %}
<b>First Name:</b> {{ child_first_name[i-1]|default('N/A')|escape }}<br>
<b>Last Name:</b> {{ child_last_name[i-1]|default('N/A')|escape }}<br>
{% endfor %}
{% endif %}
<b>Departure Date:</b> {{ departure_date|default('N/A')|escape }}<br>
<b>Departure City:</b> {{ departure_city|default('N/A')|escape }}<br>
<b>Flexibility:</b> {{ departure_flexibility|default('N/A')|escape }}<br>
<b>Earliest date I can leave:</b> {{ depart_day|default('N/A')|escape }}<br>
<b>Latest date I can be back:</b> {{ back_day|default('N/A')|escape }}<br>
<b>Email Address:</b> {{ email_address|default('N/A')|escape }}<br>
<b>Telephone:</b> {{ tel1 ~ tel2 ~ tel3 }}<br>
<b>Message:</b> {{ special_message|default('N/A')|escape }}<br>
</div>
</body>
</html>
이 클라이언트가 이메일
"\n\n\n \n<\/head>\n\n
\n\n
New Tour Request<\/h1>\n
\n\n
\n
Registration For: Trip Title <\/li> \n
Total Adults: 1 <\/li>\n<\/ul> \n \n
\n
First Name:<\/b> CustomerFN <\/li>\n
Last Name:<\/b> CustomerLN <\/li>
\n <\/ul>\n \n <\/ul>\n
\n
Total Children: 0<\/li>\n <\/ul> \n
\n
Departure Date: 04\/02\/2014<\/li>\n
Flexibility: <\/li>\n
Earliest date I can leave: 04\/03\/2014<\/li>\n
Latest date I can be back: 04\/25\/2014<\/li>\n
Email Address: [email protected] <\/li>\n
Telephone: 1111111111<\/li>\n
Message: Testing Message <\/li>\n
나는이 format을 사용하여 이메일을 보내는 시도를 수신하지만, 그것은 단지 보여주는 한 방법이다 "\ n \ n \ n" 그 밖의 것은 없습니다. 나는 문제가 될 수 있는지 모르지만 정말 이상합니다.
콘텐츠를 html로 렌더링하려면 [mime 버전 및 콘텐츠 유형] (http://stackoverflow.com/questions/3058897/sending-html-email-from-php)을 설정해야합니다. – John
@ John - 나는 가 작동하지 않습니다. – user3339224
어떻게 보내십니까? 양식을 제출할 때 어떤 코드가 전송하고 있습니까? 여기 또 다른 좋은 [PHP 튜토리얼] (http://css-tricks.com/sending-nice-html-email-with-php/) – John