summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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' ) ) {
}
}
}
-