2016-02-08 58 views
2

我有一個使用Coldfusion 11 cfmail標籤作爲附件發送圖像的非常簡單的例子。cfmailparam處置文件名在Outlook中不起作用

<cfmail to="[email protected]" from="[email protected]" subject="Test" type="html"> 
<cfmailparam 
file="www.example.com/image.png" 
disposition="attachment; filename=""test.png"""> 
</cfmail> 

我希望附件在收件人電子郵件客戶端中查看時被稱爲「test.png」。

當我在Gmail中收到電子郵件時,它工作正常,但Outlook 2013(和Office 365 Web客戶端)保留「image.png」附件名稱。

我是否正確使用了「配置」屬性?

回答

1

如果disposition不適用於您,請嘗試結合使用filecontent代替。

<cfmailparam 
    file="test.png" 
    content="#fileRead('image.png')#" > 

More details here

+0

我希望不要先讀取文件,但這確實有效。謝謝。 – Masterbuddha

相關問題