2012-06-01 257 views

回答

1

這就是Sender Name字段的作用。這是我的設置看起來像什麼樣子的雷鳥(我的webmail客戶端格式它同樣也是如此):

image

+0

問題是我的名字中有括號,出於某種原因,Magento拒絕了這一點。 – jyoseph

0

你可以看看code/core/Mage/Core/Model/Email.php爲實際的郵件執行。您可能會注意到它使用Zend_Mail。現在,這裏是漁獲:

For security reasons, Zend_Mail filters all header fields to prevent header 
injection with newline (\n) characters. Double quotation is changed to single 
quotation and angle brackets to square brackets in the name of sender and recipients. 
If the marks are in email address, the marks will be removed. 

什麼可以做,雖然是使一個模塊改寫當前類Mage_Core_Model_Email並覆蓋send()功能。我覆蓋了this question's answer之前的重寫課程。然後,在這個新改寫的類中,你可以使用PHPmailer,調用shell郵件命令,或者任何你會碰巧知道會允許這種行爲的PHP庫。

祝你好運。

0

我不知道它是否能正常工作。在magento裏面是一個Zend_Validate,它對這些電子郵件地址進行驗證。我不這麼認爲,像'富酒吧'這樣的電子郵件是有效的。但我認爲客戶的電子郵件客戶端中的顯示取決於客戶端,不是嗎?