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.

Email Notification: Send a pdf via email

  1. I tried

    add_filter("gform_user_notification_attachments", "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 . "/my_file.jpg";
        return $attachments;

    and i cant get this to work.

    Posted 11 years ago on Friday March 8, 2013 | Permalink
  2. Can you try hard-coding the path to the file on line 11, instead of relying on those variables, and see if that works? We need to see where this is breaking down.

    You could also print_r the $upload array on line 5.5 and print_r the $attachments array on line 12, as temporary debugging steps.

    Posted 11 years ago on Tuesday March 12, 2013 | Permalink