sendEmail - Content-Type .xlsx
CentOS Linux release 7.9.2009 (Core)
sendemail-1.56-1.el7.noarch
При отправке .xlsx файла не верно определяется Content-Type, что может вызвать некоторые ошибки в почтовом клиенте.
Необходимо добавить вручную данный тип файла.
@@ -926,7 +926,6 @@
elsif ($encoding =~ /exe|bin/i) { $content_type = 'application/octet-stream'; }
elsif ($encoding =~ /ppt|pot|ppa|pps|pwz/i) { $content_type = 'application/vnd.ms-powerpoint'; }
elsif ($encoding =~ /mdb|mda|mde/i) { $content_type = 'application/vnd.ms-access'; }
+ elsif ($encoding =~ /xlsx/i) { $content_type = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';}
elsif ($encoding =~ /xls|xlt|xlm|xld|xla|xlc|xlw|xll/i) { $content_type = 'application/vnd.ms-excel'; }
elsif ($encoding =~ /doc|dot/i) { $content_type = 'application/msword'; }
elsif ($encoding =~ /rtf/i) { $content_type = 'application/rtf'; }
Обсуждение