This was previously reported here: #1219 (closed)
The issue was closed but not fixed
The problem is that PHP mailer uses iso-8859-1 by default. When creating a new instance of PHPMailer, the charcter set should be set according to the variable $default_charset in config.inc.php
Designs
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related.
Learn more.
I also think that the default encoding should be utf-8 both in config.inc.php and in clas.phpmailer.php because there are some third party modules that directly use the PHPMailer class and not the Vtiger_Mailer class.
@ruben.estrada We tried testing this mail content as specified below, without making any changes to Mailer charset, Which works fine.
Conjunto de assinaturas em Minhas preferências será anexado à parte inferior do e-mail
O número E.164 formatação pode ter um máximo de quinze dígitos e são geralmente escrito da seguinte forma: [+] [código do país] [número de assinantes, incluindo código de área] Por exemplo, para converter um número de telefone dos EUA (415 599 2671) para o formato E.164, seria preciso acrescentar o prefixo \'+\' eo código do país (que é 1) na frente do número (+1 415 599 2671 ). No Reino Unido e muitos outros países internacionalmente, discagem local exige a adição de um 0 na frente do número do assinante. No entanto, ao utilizar a formatação E.164, isto 0 deve ser removido. Um número, como 020 7183 8750 no Reino Unido seria formatado como +44 20 7183 8750.',
Preferências de e-mail do destinatário
Could you please share with us the sample content, where you found that charset encoding is breaking. So re-check and consider this fix.
I don't remember exactly which content failed in my case, but things like this: áéíóúÁÉÍÓÚñÑ should be able to reproduce the error. I think you should take a look at the html source of the workflow template, because if accented characters such as á is being stored as á then I think there won't be an error (you should see it as á in the html source I think).
If an email server is configured in the official demo I can try to reproduce it there. Just let me know.
Contrary to what I previously said, the accented characters are stored as html entities (e.g. ó). Sorry, my mistake.
The content is incorrectly displayed as follows when sent directly to a contact (not necessarily a workflow) and $CharSet = 'iso-8859-1' in vtigercrm/modules/Emails/class.phpmailer.php:
if I change encoding to UTF-8 it gets displayed correctly:
In both cases, I had $default_charset = 'UTF-8'; in config.inc.php
@uma.s that's wired. I don't know then. Could it be related to the configuration of the smtp server or email client? Still I would suggest to take my merge request (or do a similar fix) because there are users having the same problem and it does get fixed with the changes suggested, even though, as your tests demonstrate, it seems it does not happen under certain circumstances.
@uma.s sorry, there's something I didn't include in my pull request. I think the default character set in class.phpmailer.php should be set to UTF-8 instead of iso-8859-1
In my opinion there are two reasons for that:
Consistency. The default encoding in config.inc.php is UTF-8.
Third party extensions. There are third party extensions that use the phpmailer class directly (instead of Vtiger_Mailer). In those cases they will get the default encoding, which I think should be UTF-8. I actually also got emails with the funny characters even after my fix and that's how I realized this point. It happened with a VTExperts extension as well as with one of my own. Changing the default in phpmailer to UTF-8 fixed that.
Let me know if you want me to do an additional pull request for that.