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

    cfmail sending double attachments.

    Irish-Phoenix Level 1


      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"
                       nameconflict="Makeunique" accept="#request.AcceptImage#">


      <cfmail to="test@gmail.com"
              subject="Submitted Idea"
              type="html" SpoolEnable="no"
      <cfmailparam name="X-Priority" value="1"/>


      This is all my email stuff from the forms


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


      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.