summaryrefslogtreecommitdiff
path: root/Postman
diff options
context:
space:
mode:
authoryehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664>2018-08-09 20:36:39 +0000
committeryehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664>2018-08-09 20:36:39 +0000
commit36ca8f7437e86733fce2eaf03d6374a212a86453 (patch)
tree7051395da30ee2b846e23cf4a702293cf04b3788 /Postman
parentd69fa28410413f8c4d2ec6d4da09012342ddf29f (diff)
downloadPost-SMTP-36ca8f7437e86733fce2eaf03d6374a212a86453.zip
replace "buggey" mime_content_type php function - Hosting should enable the ;extension=php_fileinfo.dll
Diffstat (limited to 'Postman')
-rw-r--r--Postman/Postman-Mail/PostmanSendGridMailEngine.php4
1 files changed, 2 insertions, 2 deletions
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' ) ) {
}
}
}
-