Opened 19 years ago
Closed 16 years ago
#3658 closed defect (bug) (duplicate)
Mail server rejects new user emails with UTF8 characters in Subject when using pl_PL translation
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 2.1 |
| Component: | Charset | Keywords: | |
| Focuses: | Cc: |
Description
When I try to register a new user, using localized content (pl_PL) mail server (postfix) refuses this mail with error message:
554 5.6.0 Message with invalid header rejected, id=08055-01-11 - Non-encoded 8-bit data (char C5 hex) in message header 'Subject': Subject: ...t w Sopocie] Twoja nazwa u\\305\\274ytkownika i has\\305o\\n)
so I wrote a quick dirty patch (in attachment)
Attachments (1)
Change History (20)
#1
@
19 years ago
wark please include the version of WordPress you are running and the version the patch is for
#5
@
19 years ago
- Keywords wp_mail mail header umlauts added
This is a _very_ bad solution. In my plugin I solved this via checking the Subject:
mb_check_encoding($subject, "ASCII")
in case this fails I use the encode-function from the first post at http://de2.php.net/manual/de/function.mail.php
If someone thinks this makes sense, I can write a patch. Just leave me a note.
#6
follow-up:
↓ 17
@
19 years ago
- Priority changed from low to normal
And by the way I would upgrade this to normal priority as Wordpress is used in quite a few non-ASCII-languages and not encoding breaks the rfc.
Further information on the subject can be found here: http://www.faqs.org/rfcs/rfc2047.html
#9
@
17 years ago
Yes ... (2.8-bleeding-edge) Revision: 11119
2009 Apr 29 13:44:35 mail postfix/lmtp[16319]: 27B883F2129: to=<wa...@wp.pl>, relay=127.0.0.1[127.0.0.1], delay=3, status=sent (250 2.5.0 Ok wa...@wp.pl, DSN sent (554 5.6.0 Message with invalid header rejected, id=15537-01-95 - Non-encoded 8-bit data (char C5 hex) in message header 'Subject': Subject: ...nt_w_Sopocie]_Twoja_nazwa_u\\305\\274ytkownika_i_ha...))
#11
@
17 years ago
- Component changed from Administration to Charset
- Keywords encoding added
This is because there is no documentation how data is encoded that is used in string variables used wihtin the data flow in wordpress.
I've changed the component to charset sothat it get's on my list.
#13
@
16 years ago
- Cc david_v_wright@… added
I tried to recreate this and cant.
steps I took:
- wp-config.php - added:
define ('WPLANG', 'pl_PL');
(pl_PL.mo) to wp-content/languages
- added new user via backend admin area
- email successfully received by user (no Postfix error)
Subject: [dev_test] Twoja nazwa użytkownika i hasło Body: [dev_test] Twoja nazwa użytkownika i hasło Nazwa użytkownika: dev_test Hasło: dev_test wordpress/wp-login.php
wordpress 2.9 revision 12156
postfix version 2.5.5-1.1
Did I miss something?
#14
@
16 years ago
my db settings:
define('DB_CHARSET', 'utf8');
define('DB_COLLATE', 'utf8_general_ci');
#15
@
16 years ago
- Milestone changed from 2.9 to Future Release
If this is still happening it would need a better patch.
#16
@
16 years ago
- Keywords needs-testing added; encoding removed
- Summary changed from Sending mail with UTF characters in Subject to Mail server rejects new user emails with UTF8 characters in Subject when using pl_PL translation
Updated summary to better summarise the issue.
Marked as needs-testing - maybe this issue has been fixed.
Otherwise will need some in depth testing.
#17
in reply to:
↑ 6
@
16 years ago
Replying to morty:
And by the way I would upgrade this to normal priority as Wordpress is used in quite a few non-ASCII-languages and not encoding breaks the rfc.
Further information on the subject can be found here: http://www.faqs.org/rfcs/rfc2047.html
Morty is right, email headers (as those in HTTP) need to be ASCII regardless of the encoding in the mail-body.
#18
@
16 years ago
'=?UTF-8?B?'.base64_encode($subject).'?=' Comment on PHP.net, see also rfc2047: 2. Syntax of encoded-words.
#19
@
16 years ago
- Keywords needs-patch needs-testing removed
- Milestone Future Release deleted
- Resolution set to duplicate
- Status changed from new to closed
Reviewed again, PHPMailer should take care of that. It supports B and Q encoding for the subject (and other headers/texts). Was introduced in [4946] which was after this ticket was opened. As describben in #3862, one hope was to solve encoding problems as in #209 which is quite the same like this ticket. Was then Fixed in 2.2.
I will close this ticket now as duplicate of #209.
Quick patch which allows to send mail with UTF characters in Subject: