Hi, I'm using the code below to send out a standard attachment with each user notification. The notifications get sent out, however, with no attachment. Any idea what I'm doing wrong?
# add attachment feature to user notification
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["/var/www/2xy/data/www/messagehouse_2012/wordpress/wp-content/uploads/temp"];
$attachments = array();
//add a file from the uploads folder
$attachments[] = $upload_path . "/test.pdf";
return $attachments;
}
Posted 12 years ago on Wednesday November 14, 2012 |
Permalink