PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Can't attach file to user notification

  1. Hello,
    I'm the original poster of this post:
    http://www.gravityhelp.com/forums/topic/use-pre-selected-file-as-user-notification-attachment#post-53767

    I was away when Alex posted the updated code that solved the issue for the other two people who responded to that post. Unfortunately, I'm still having the same problem as before (the notification email gets sent out but there is no file attached to it).

    The original post was closed which is why I'm starting this thread.

    I cut and pasted the code exactly as shown in the post. I've double checked my file location and case. I've also tried it with and without a form id on the filter, all with no luck.

    This is what's in my functions.php file:

    /** Add support for attachment on Gravity Form 2 (Request vCard) */
    	add_filter('gform_user_notification_attachments_2', 'add_attachment', 10, 3);
    function add_attachment($attachments, $lead, $form){
    
        //getting wordpress upload folder
        $upload = wp_upload_dir();
        $upload_path = $upload['basedir'];
    
        $attachments = array();
    
        //add a file from the uploads folder
        $attachments[] = $upload_path . '/2012/JenniferFeurer.vcf';
    
        return $attachments;
    }

    Alex, any help would be appreciated. Is there a gravity forms log file that could tell me where the problem is?

    At this point I'm willing to hire someone to resolve the issue if they have a solution.

    Thanks,
    Jennifer

    Posted 12 years ago on Wednesday April 11, 2012 | Permalink
  2. Jennifer,
    The code above looks good. I could take a quick look at your server and get it working for you if you can send me an admin login to your WP dashboard as well as an FTP login to alex@rocketgenius.com.

    Posted 12 years ago on Thursday April 12, 2012 | Permalink
  3. anjoalre
    Member

    Hi Alex,

    I'm having the same problem as JenF, the email is send but the the attach file is not.
    First i thought it was because of being in localhost, but now i'm live.

    Please shed some light,
    best regards,

    Posted 11 years ago on Tuesday May 8, 2012 | Permalink
  4. If you paste your code i will be happy to take a look at it and try to see what is going on

    Posted 11 years ago on Tuesday May 8, 2012 | Permalink
  5. anjoalre
    Member

    Hi Alex,
    i've discovered my mistake, i had the user notification email disabled and was sending only the administrator notification. It's working now!
    Maybe JenF mistake is the same...
    Thanks.

    Posted 11 years ago on Wednesday May 9, 2012 | Permalink