[ 
https://issues.apache.org/jira/browse/ZETACOMP-114?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jérôme Vieilledent updated ZETACOMP-114:
----------------------------------------

    Description: 
When using ezcMailAddress with a charset other than us-ascii (let's say 
"utf-8") for a sender with a name having accents (also valid for cc, bcc and 
receiver), ezcMailTools::composeEmailAddress() does the encoding via 
iconv_mime_encode(). This operation eventually adds a line break (\r\n) if 
generated name is too long (exceeding 76 chars).
Problem is that this operation is done a 2nd time in 
ezcMailPart::generateHeaders(), potentially introducing a new line break. This 
completely messes up the mail headers and can end with something like that :

{code}
From: =?utf-8?Q?mailTest=C3=A4=C3=B6=C3=BC=20mail?==?utf-8?Q?Test?=

 =?utf-8?Q?=C3=A4=C3=B6=C3=BC?= <[email protected]>
To: Test mail <[email protected]>
Subject: =?utf-8?Q?This=20is=20a=20test=20H=C3=A9h?==?utf-8?Q?=C3=A9=C3=B6?=
 =?utf-8?Q?=C3=AF=C3=BB$=C3=B9=20@=C3=A8=C3=AA=C3=AB=C3=B8?=
MIME-Version: 1.0
User-Agent: eZ Components
Date: Tue, 03 Jan 2012 14:56:21 +0100
Message-Id: <[email protected]>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
{code}

Here the From header is completely broken.
The original sender name is "mailTestäöüß mailTestäöüß"

  was:
When using ezcMailAddress with a charset other than us-ascii (let's say 
"utf-8") for a sender with a name having accents (also valid for cc, bcc and 
receiver), ezcMailTools::composeEmailAddress() does the encoding via 
iconv_mime_encode(). This operation eventually adds a line break (\r\n) if 
generated name is too long (exceeding 76 chars).
Problem is that this operation is done a 2nd time in 
ezcMailPart::generateHeaders(), potentially introducing a new line break. This 
completely messes up the mail headers and can end with something like that :

{code}
From: =?utf-8?Q?mailTest=C3=A4=C3=B6=C3=BC=20mail?==?utf-8?Q?Test?=

 =?utf-8?Q?=C3=A4=C3=B6=C3=BC?= <[email protected]>
To: Test mail <[email protected]>
Subject: =?utf-8?Q?This=20is=20a=20test=20H=C3=A9h?==?utf-8?Q?=C3=A9=C3=B6?=
 =?utf-8?Q?=C3=AF=C3=BB$=C3=B9=20@=C3=A8=C3=AA=C3=AB=C3=B8?=
MIME-Version: 1.0
User-Agent: eZ Components
Date: Tue, 03 Jan 2012 14:56:21 +0100
Message-Id: <[email protected]>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
{code}

Here the *From* header is completely broken.
The original sender name is _mailTestäöüß mailTestäöüß_

    
> Using ezcMailAddress with specific charset can break final Mail headers
> -----------------------------------------------------------------------
>
>                 Key: ZETACOMP-114
>                 URL: https://issues.apache.org/jira/browse/ZETACOMP-114
>             Project: Zeta Components
>          Issue Type: Bug
>          Components: Mail
>         Environment: PHP 5.3 / 5.4
>            Reporter: Jérôme Vieilledent
>
> When using ezcMailAddress with a charset other than us-ascii (let's say 
> "utf-8") for a sender with a name having accents (also valid for cc, bcc and 
> receiver), ezcMailTools::composeEmailAddress() does the encoding via 
> iconv_mime_encode(). This operation eventually adds a line break (\r\n) if 
> generated name is too long (exceeding 76 chars).
> Problem is that this operation is done a 2nd time in 
> ezcMailPart::generateHeaders(), potentially introducing a new line break. 
> This completely messes up the mail headers and can end with something like 
> that :
> {code}
> From: =?utf-8?Q?mailTest=C3=A4=C3=B6=C3=BC=20mail?==?utf-8?Q?Test?=
>  =?utf-8?Q?=C3=A4=C3=B6=C3=BC?= <[email protected]>
> To: Test mail <[email protected]>
> Subject: =?utf-8?Q?This=20is=20a=20test=20H=C3=A9h?==?utf-8?Q?=C3=A9=C3=B6?=
>  =?utf-8?Q?=C3=AF=C3=BB$=C3=B9=20@=C3=A8=C3=AA=C3=AB=C3=B8?=
> MIME-Version: 1.0
> User-Agent: eZ Components
> Date: Tue, 03 Jan 2012 14:56:21 +0100
> Message-Id: <[email protected]>
> Content-Type: text/plain; charset=utf-8
> Content-Transfer-Encoding: 8bit
> {code}
> Here the From header is completely broken.
> The original sender name is "mailTestäöüß mailTestäöüß"

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to