Project

General

Profile

Actions

Bug #21668

closed

Wrong mail encoding

Added by Boos no-lastname-given almost 15 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2009-11-24
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.2
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

We have problems with the email encoding, probably with the encoding of the mail header.

The whole mail message is displayed in Mail Clients. No sender is visible in Mailclients Inbox, but specified in Mail Header.

We tested the following:
1) Install Tool E-Mail Check has the same problem. Mail is sent out with symptoms described above in both test modes (with htmlmail and without)

2) Mails sent out via powermail. Have the same problem. Powermail uses same functions.

3) The problem also exists on typo 4.2.8 and 4.2.9.
We have two larger projects in development stage, during development we upgraded typo3, unfortunately the problem remains.

Everything is set to utf-8, database, backend, frontend.
Apache/2.2.9 (Debian)

There has already been a reported issue in the bug tracker, but the issue is closed (http://bugs.typo3.org/view.php?id=10769)

We are now trying to ugrade to brandnew php 5.3.1.
(issue imported from #M12732)


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #20232: wrong encoded email header (t3lib_div::encodeHeader)ClosedOliver Hader2009-03-23

Actions
Related to TYPO3 Core - Bug #16808: setHeaders in class.t3lib_htmlmail forget to quote the realname parts of the "From" and "reply-to" headersClosedChristian Kuhn2006-12-22

Actions
Actions #1

Updated by Boos no-lastname-given almost 15 years ago

Upgraded to php 5.3.1
Current version typo3 4.2.10
Still the same problem.
Also Checked typo3 current 4.2.11 changelog and made a diff of mail classes, no diferences found.

Checked mails with rfc tool messagelint (http://www.apps.ietf.org/content/message-lint).

This is the protocol, showing the problems:
BEGIN -------------------------------------------------------------------------------------
WARNING: use SMTP MAIL FROM/return-path instead of non-standard errors-to in
header 'Errors-To' at line 2
ERROR: unexpected tokens at end of header 'From' at line 3
ERROR: Token type special: <
ERROR: Token type atom: test
ERROR: Token type special: @
ERROR: Token type atom: xxxxx
ERROR: Token type special: .
ERROR: Token type atom: com
ERROR: Token type special: >
UNKNOWN: unknown header 'X-Mailer' at line 4
UNKNOWN: unknown header 'X-Priority' at line 5
ERROR: At least one of To, CC, or BCC required lines 1-8 (RFC 822 sec 4.1)
ERROR: missing mandatory header 'date' lines 1-8
ERROR: missing mandatory header 'return-path' lines 1-8
OK: found part multipart/alternative line 10
OK: preamble 10:
OK: preamble 11:
OK: preamble 12: This is a multi-part message in MIME format.
OK: preamble 13:
OK: found part text/plain line 18
WARNING: decoded line 23 too long (211 chars); text/plain shouldn't need
folding (RFC 2046-4.1.1)
OK: found part text/html line 73
WARNING: decoded line 79 too long (231 chars); text/plain shouldn't need
folding (RFC 2046-4.1.1)
WARNING: decoded line 82 too long (91 chars); text/plain shouldn't need
folding (RFC 2046-4.1.1)
WARNING: decoded line 86 too long (104 chars); text/plain shouldn't need
folding (RFC 2046-4.1.1)
END -------------------------------------------------------------------------------------

Regarding the error with the recipient in the header, there once was a bug in the tracker for typo 4.04, issue #0004692 . We patched the t3lib_htmlmail like described and the error in the validator disappeared. But still mesages are not display correctly, something seems to go wrong with the encoding.

This is the debug info from the install tool, domain paths taken away:

  1. DEBUG SYSTEM INFORMATION - START ###
    HTTP_HOST : xxxxxxxxxxxx
    TYPO3_HOST_ONLY : xxxxxxxxxxxxxx
    TYPO3_PORT :
    PATH_INFO :
    QUERY_STRING : TYPO3_INSTALL[type]=phpinfo
    REQUEST_URI : /typo3/install/index.php?TYPO3_INSTALL[type]=phpinfo
    HTTP_REFERER : xxxxxxxxxxxxxxxxxx
    TYPO3_REQUEST_HOST : xxxxxxxxxxxxxxxxxxx
    TYPO3_REQUEST_URL : xxxxxxxxxxxxxxxxxxxxxxx
    TYPO3_REQUEST_SCRIPT: xxxxxxxxxxxxxxxxxxxxxxx
    TYPO3_REQUEST_DIR : xxxxxxxxxxxxxxxxxxxxxxxxxxxx
    TYPO3_SITE_URL : xxxxxxxxxxxxxxxxxxxxxxxxxxx
    TYPO3_SITE_SCRIPT : typo3/install/index.php?TYPO3_INSTALL[type]=phpinfo
    TYPO3_SSL :
    TYPO3_REV_PROXY :
    SCRIPT_NAME : /typo3/install/index.php
    TYPO3_DOCUMENT_ROOT : /var/www/vhosts/xxxxxxxxxxxxxx/httpdocs
    SCRIPT_FILENAME : /var/www/vhosts/xxxxxxxxxxxx/httpdocs/typo3/install/index.php
    REMOTE_ADDR : XXX.XXX.XXX.XXX
    REMOTE_HOST :
    HTTP_USER_AGENT : Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.38 Safari/532.0
    HTTP_ACCEPT_LANGUAGE: de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4
    CONST: PHP_OS : Linux
    CONST: TYPO3_OS :
    CONST: PATH_thisScri: /var/www/vhosts/xxxxxxx/httpdocs/typo3/install/index.php
    CONST: php_sapi_name: apache2handler
    OTHER: TYPO3_VERSION: 4.2.10
    OTHER: PHP_VERSION : 5.3.1-0.dotdeb.1
    imagecreatefromgif(): 1
    imagecreatefrompng(): 1
    imagecreatefromjpeg(: 1
    imagegif() : 1
    imagepng() : 1
    imagejpeg() : 1
    imagettftext() : 1
    OTHER: IMAGE_TYPES : 31
    OTHER: memory_limit : 128M
    SERVER: SERVER_PORT : 80
    SERVER: SERVER_SOFTW: Apache/2.2.9 (Debian) mod_jk/1.2.26 PHP/5.3.1-0.dotdeb.1 with Suhosin-Patch mod_python/3.3.1 Python/2.5.2 mod_ssl/2.2.9 OpenSSL/0.9.8g mod_perl/2.0.4 Perl/v5.10.0
    SERVER: GATEWAY_INTE: CGI/1.1
    SERVER: SCRIPT_NAME : /typo3/install/index.php
    SERVER: PATH_TRANSLA:
    T3CV_GFX: image_proc: 1
    T3CV_GFX: gdlib : 1
    T3CV_GFX: gdlib_png : 0
    T3CV_GFX: gdlib_2 : 0
    T3CV_GFX: im : 1
    T3CV_GFX: im_path : /usr/X11R6/bin/
    T3CV_GFX: im_path_lz: /usr/bin/
    T3CV_GFX: im_version: gm
    T3CV_GFX: im_negate_: 0
    T3CV_GFX: im_imvMask: 0
    T3CV_GFX: im_combine: combine
  2. DEBUG SYSTEM INFORMATION - END ###
Actions #2

Updated by Boos no-lastname-given almost 15 years ago

PROBLEM IS SOLVED
The errors occured due to the php directive mail.add_x_header. This was accidentally globally set to on in a new server environment. The directive is buggy, as it automatically adds a directive to the mailheaders with the wrong linebreak so that the header crashes. On Unix systems this should be turned off.

Actions #3

Updated by Chris topher over 14 years ago

Closed as requested, no change required.

Thank you for keeping us updated, Boos!

Actions

Also available in: Atom PDF