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 に答える