使用SuiteCRM发送邮件时,PDF附件名称乱码,系统会更改附件的pdf文件名。例如原本我们的附件是:“ 测试_order.pdf ”,当邮件发送后,接收者看到的样子是:“ =?UTF-8?Q?= 32 = 30 = 32 = 30 = 5F = 30 = 31 = 5F = 32 = 30 = 5FSOCIAL = 5FSECURITY = 5FPO = 5FMs = 2E?= =?UTF-8?Q?= 5FChatzopoulou = 5FAngeliki = 2Epdf?= ”
并且接收者还打不开附件,怎么解决呢?
编辑文件:modules/Emails/Email.php
在文件中添加如下代码:
setlocale(LC_ALL, "en_US.utf8");
$filename = iconv('UTF-8','ASCII//TRANSLIT',$filename);
$filename = str_replace('_', '.', $filename);
再去试一下发送电子邮件并且夹带附件,如下: