1

我正在尝试发送一封带有附件的电子邮件,但我收到了一个我不熟悉的错误。

这是我的<cfmail>标签代码:

<CFMAIL FROM="test@test.com" TO="test2@test2.com"  SUBJECT="Test" type="HTML">
<P> This is the attachments test</P>
<p> For this test to be successful, we need to receive some file attachments with this email</p>
  <cfsilent>
    <cfloop query="result">

        <cfmailparam file="#result.NAME#" disposition="attachment">

    </cfloop>
  </cfsilent>
</cfmail>

这是错误:

The resource 2011093475839213.txt was not found.

**The root cause was: ''.**

The error occurred in E:\sites\Example.Com\FolderExistsTest.cfm: line 71
69 :     <cfloop query="result">
70 :       
71 :         <cfmailparam file="#result.NAME#" disposition="attachment" type="text">
72 :     
73 :     </cfloop>

请注意,我尝试附加的文件确实存在。

4

1 回答 1

1

这是指定文件路径的正确方法。

   <cfmailparam file="#CurrentDirectory#\#result.NAME#" disposition="attachment" type="text">
于 2012-06-20T18:34:51.123 回答