wp_mail attachment not working
-
$file_result =””;
“Upload:”.$_FILES[“file”][“name”].”</br>”.
“Type:”.$_FILES[“file”][“type”].”</br>”.
“Size:”.($_FILES[“file”][“size”]/1024).”</br>”.
“tmp tile:”.$_FILES[“file”][“tmp_name”].”</br>”.move_uploaded_file($_FILES[“file”][“tmp_name”],”../new_theme/wp-content/plugins/add New Product/uploads/”.$_FILES[“file”][“name”]);
// $attachment = move_uploaded_file($_FILES[“file”][“tmp_name”],”../wcvendor/wp-content/plugins/add New Product/uploads/”.$_FILES[“file”][“name”]);
$x= $_FILES[“file”][“name”];
//$attachments = array(WP_CONTENT_DIR . ‘../new_theme/wp-content/plugins/add New Product/uploads/’.$x.”);
// $headers = ‘From:’ .$user. ‘<[email protected]>’ . “\r\n”;
$attachments = array(WP_CONTENT_DIR . ‘/new_theme/wp-content/plugins/add New Product/uploads/sayeeda .zip’);
wp_mail(‘[email protected]’, ‘test’ , ‘PFA’,$attachments);
//wp_mail(‘[email protected]’,’Vendor Data’,$user);This is my code am not able to fetch attachment
The topic ‘wp_mail attachment not working’ is closed to new replies.