From 36ca8f7437e86733fce2eaf03d6374a212a86453 Mon Sep 17 00:00:00 2001 From: yehudah Date: Thu, 9 Aug 2018 20:36:39 +0000 Subject: replace "buggey" mime_content_type php function - Hosting should enable the ;extension=php_fileinfo.dll --- Postman/Postman-Mail/PostmanSendGridMailEngine.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Postman/Postman-Mail') diff --git a/Postman/Postman-Mail/PostmanSendGridMailEngine.php b/Postman/Postman-Mail/PostmanSendGridMailEngine.php index b6082f9..06302b0 100644 --- a/Postman/Postman-Mail/PostmanSendGridMailEngine.php +++ b/Postman/Postman-Mail/PostmanSendGridMailEngine.php @@ -260,9 +260,10 @@ if ( ! class_exists( 'PostmanSendGridMailEngine' ) ) { $file_name = basename( $file ); $file_parts = explode( '.', $file_name ); + $file_type = wp_check_filetype( $file ); $attachments[] = array( 'content' => base64_encode( file_get_contents( $file ) ), - 'type' => mime_content_type( $file ), + 'type' => $file_type['type'], 'file_name' => $file_name, 'disposition' => 'attachment', 'id' => $file_parts[0], @@ -279,4 +280,3 @@ if ( ! class_exists( 'PostmanSendGridMailEngine' ) ) { } } } - -- cgit v1.2.3