2 Replies Latest reply on Jan 30, 2010 9:05 AM by Jochem van Dieten

    cfmail sending double attachments.

    Irish-Phoenix Level 1

      Hello;

      I wrote a cfmail app that allows you to send one attachment. Everything about it works fine. The problem is, it's sending 2 of the uploaded image and I can't figure out why. I'm not going to put in all my error code and so on, I'm just showing my cffile, and then the main part of my cfmail, I believe the problem is in how I'm attaching my file that is to be uploaded from the user.

       

      <cffile action="upload"
                       filefield="attachment_1"
                       destination="c:\websites\187914Kg3\uploads\"
                       nameconflict="Makeunique" accept="#request.AcceptImage#">

       

      <cfmail to="test@gmail.com"
              cc="another@gmail.com"
              from="#form.email#"
              subject="Submitted Idea"
              type="html" SpoolEnable="no"
              server="mail.gmail.com"
        port="25">
      <cfmailparam name="X-Priority" value="1"/>

       

      This is all my email stuff from the forms

       

      <cfsilent>
           <cfif FORM.attachment_1 neq "">
              <cfmailparam file="#attachment_local_file_1#">
           </cfif>
        </cfsilent>
        <cfmailparam file="#CFFILE.ServerDirectory#/#CFFILE.ServerFile#" remove="true"/>
      </cfmail>

       

      and that's the main part of it aside from the form to send, and error control and those things.
      Can anyone see what I'm doing wrong here? possibly help me fix my issue?

       

      Thank you.