2012-07-05 87 views
0

我有一個Drupal的網絡應用程序,發出訂單時的電子郵件。我們有HTMLMail以便用主題格式化傳出消息。目前頁眉和頁腳正確包裝,因爲它們應該與圖形,但正文文本顯示原始的HTML代碼。PHP不在電子郵件中呈現HTML

實施例:

<p>We have received your order and one of our representatives will review your information shortly. If you have any questions about this order please call us at (phone). Please reference your reservation number when calling. Here are the details of your order:</p><div class="item-list"><h3>Order Summary</h3><ul><li class="first"><span class="confirmation-label">Confirmation Number:</span> 

等等等等。在郵件模板中,只需執行'echo $ body';打印應包含上述內容的消息。

+0

不熟悉HTMLMail模塊,但是......有可能是身體可能應用了錯誤的文本格式過濾器? – nmc 2012-07-05 19:43:15

回答

1

將主體的內容類型設置爲text/html並確保您沒有任何代碼可以自動轉義它。

+0

已經完成了所有這些。 – Kevin 2012-07-05 18:38:00