Question: I have this mail notification for new post.

All the new post contain arround 100 words and no pictures, so I would like to include in the notification the post content and if is possible, the number of words in the post.

Anybody could help me? 

Thanks for all

```
    /* avisar al admin*/
function submit_send_email ($post) {

        $user_info = get_userdata ($post->post_author);
        $strTo = array ('mail@mail.com');
        $strSubject = 'Your website name: ' . $user_info->user_nicename . ' submitted a post';
        $strMessage = 'A post "' . $post->post_title . '" by ' . $user_info->user_nicename . ' was submitted for review at ' . wp_get_shortlink ($post->ID) . '&preview=true. Please proof.';
        wp_mail( $strTo, $strSubject, $strMessage );

}
add_action('future_to_pending', 'submit_send_email');
add_action('new_to_pending', 'submit_send_email');
add_action('draft_to_pending', 'submit_send_email');
add_action('auto-draft_to_pending', 'submit_send_email');

```

Answer: 
@rana-umer your code is correct just remove the "+xml" after 'image/svg'.

```
//add SVG to allowed file uploads
function add_file_types_to_uploads($file_types){

     $new_filetypes = array();
     $new_filetypes['svg'] = 'image/svg';
     $file_types = array_merge($file_types, $new_filetypes );

     return $file_types; 
} 
add_action('upload_mimes', 'add_file_types_to_uploads');

```
The first function is to check the WordPress and add support on WP version lower than 4.8. The second function is to register the mime file type(SVG) and the last one is to fix the thumbnails on media library.

```
 /**
 * Add svg support
 *
 */
add_filter( 'wp_check_filetype_and_ext', function( $data, $file, $filename, $mimes) {
      global $wp_version;
      if( $wp_version == '4.7' || ( (float) $wp_version < 4.7 ) ) {
      return $data;
    }
    $filetype = wp_check_filetype( $filename, $mimes );
      return [
      'ext'             => $filetype['ext'],
      'type'            => $filetype['type'],
      'proper_filename' => $data['proper_filename']
    ];
}, 10, 4 );

function ns_mime_types( $mimes ){
   $mimes['svg'] = 'image/svg+xml';
   return $mimes;
}
add_filter( 'upload_mimes', 'ns_mime_types' );

function ns_fix_svg() {
  echo '<style type="text/css">.attachment-266x266, .thumbnail img { width: 100% !important; height: auto !important;} </style>';
}
add_action( 'admin_head', 'ns_fix_svg' );

```