CodeIgniter Forums
Email class - wrong encoding in some webmails - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: Email class - wrong encoding in some webmails (/showthread.php?tid=58105)



Email class - wrong encoding in some webmails - El Forum - 05-15-2013

[eluser]nony[/eluser]
Hi there,

i am using codeigniter to send emails.
but in one webmail agent (centrum.sk) there is bad encoding.
All other emails in this webmail agent are good except my from codeigniter
Everywhere i setted up UTF-8 charset.

this config i am using:
Code:
$config['mailtype'] = 'html';
            $config['charset']  = 'utf-8';
            $config['crlf']     = "\r\n";
            $config['newline']  = "\r\n";

i also set http headers to utf-8
Code:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
.

all script files are utf-8 encoded - checked in notepad++

database connection is utf-8
database collation is utf8_general_ci

here is the mail header
Code:
Delivered-To: xxxx
Received: from ironport4.centrum.cz (unknown [10.32.3.102])
by gmmr7.centrum.cz (Postfix) with ESMTP id 362D98036967
for <xxxxx>; Wed, 15 May 2013 17:49:18 +0200 (CEST)
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AuUEAJmrk1ElCayHf2dsb2JhbABbgkMCBXSCdUe+GBYOAQEJDQoIFCiCSR0BAQcxEwEEAwM+AkJBh38IkEKaMXKDTQEFjWAGjzuCLIEThzuRJIRhjkY
Received: from mailout-6.websupport.sk ([37.9.172.135])
  by mx.centrum.cz with ESMTP/TLS/ADH-AES256-SHA; 15 May 2013 17:49:17 +0200
Received: from lb2.websupport.sk (localhost [127.0.0.1])
by smtp-cf.websupport.sk (Postfix) with ESMTP id C79B610033E8
for <[email protected]>; Wed, 15 May 2013 17:49:17 +0200 (CEST)
Received: from xxxx (data16.websupport.sk [37.9.168.12])
(Authenticated sender: xxxxxx)
by mail1.websupport.sk (Postfix) with ESMTPA
for <xxxxxx>; Wed, 15 May 2013 17:49:17 +0200 (CEST)
User-Agent: CodeIgniter
Date: Wed, 15 May 2013 17:49:17 +0200
From: "xxx" <xxx>
To: xxxxx
Subject: =?utf-8?Q?xxx_-_nov=c3=a1_spr=c3=a1va?=
Reply-To: "xxxx" <xxxx>
X-Sender: xxxx
X-Mailer: CodeIgniter
X-Priority: 3 (Normal)
Message-ID: <[email protected]>
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="B_ALT_5193ae7dacfc8"
X-Virus-Checked: Checked by ClamAV on lb2.websupport.sk
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xxxx; s=mail;
t=1368632957; bh=i8TpiTscCjUX9qzPwAOxdWqMG1OgAMMuQM69n2/BZiA=;
h=Date:From:To:Subject:Reply-To;
b=JNKqLk0N+iApK0tspdAvj+ezErBymJSpLf3H/mql2rUMJJWPo7+BsuBsUBGTpZtpE
  T3EPlRPdiPe4qTQIn0RQI27XhYpP7LYNCpwbwfQhTwDnB7r4LJcToN2omleyaufGgX
  qRK345TXQGC8rBn5Qx+gSzKAVYsTBw1+IapHZoOc=

This is a multi-part message in MIME format.
Your email application may not support this format.

--B_ALT_5193ae7dacfc8
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit



Email class - wrong encoding in some webmails - El Forum - 05-15-2013

[eluser]CroNiX[/eluser]
https://github.com/EllisLab/CodeIgniter/issues/1409


Email class - wrong encoding in some webmails - El Forum - 05-15-2013

[eluser]nony[/eluser]
My subject is encoded good. Only in mail body there are missing letters.
Check attachment.

If i change $config['mailtype'] to text, i can see html but encoding of mail body is good.