HowTo: send outbound e-mail messages in UTF-8 encoding

21 views
Skip to first unread message

dkarasev

unread,
Nov 19, 2010, 1:59:24 PM11/19/10
to Factory Nova (FN): unofficial support group
Hello everyone,

I would like to share the advise how to make all outbound e-mails
encoded in UTF-8 codepage. This will be helpfull for russian speaking
customers reading e-mails from Factory on their iPhone devices.

So, found the /system/class/nsemail.class.php and change lines 99 -
101:

was:
$msg->body = convert_cyr_string($msg->body, 'koi8-r',
'windows-1251');
$msg->headers['subject'] = convert_cyr_string($msg-
>headers['subject'], 'koi8-r', 'windows-1251');
$msg->charset = 'windows-1251';

now:
$msg->body = iconv('koi8-r', 'utf-8', $msg->body);
$msg->headers['subject'] = iconv('koi8-r', 'utf-8', $msg-
>headers['subject']);
$msg->charset = 'utf-8';

Hope this is will help someone.
Reply all
Reply to author
Forward
0 new messages