[imp] Problem with character in from field
Jan Schneider
jan@horde.org
Mon, 21 Jan 2002 02:28:10 +0100
Zitat von Michael M Slusarz <slusarz@bigworm.colorado.edu>:
> Quoting Jan Schneider <jan@horde.org>:
> |
> | I tested with some umlauts and different languages/charsets and had no
>
> | problem. I can think of that the Wrom:
> HDMNNSKVFVWRKJVZCMHVIBGDADRZFSQHY
> | That's of course the fault of the sender's mail client but perhaps we
> can
> |
> | silent those errors.
> |
> | Can you cut the error messages that appear in the mailbox view and
> send
> | it
> | together with the raw header of that message?
>
>
> Raw Header of the message:
> --------------------------
>
> Wrom: VZCMHVIBGDADRZFSQHYUCDDJBLVLMHAALPTCX
This is an invalid header.
> Error messages in mailbox.php:
> ------------------------------
> Notice: Invalid CHAR in quoted string: ÖÖhrn"
> NIL "johan_oern" "hotmail.com")) (("Johan Öhrn" NIL "johan_oern"
> "hotmail.
> (errflg=1) in Unknown on line 0
These error messages aren't very helpful because they don't tell us where
it actually happen. I wasn't even able to create such a message for testing
because all mail clients/servers changed the header correctly.
Could you try this patch against the cvs version and see if it silences
these messages?
---snip---
Index: mailbox.php
===================================================================
RCS file: /repository/imp/mailbox.php,v
retrieving revision 2.317
diff -u -r2.317 mailbox.php
--- mailbox.php 21 Jan 2002 01:10:51 -0000 2.317
+++ mailbox.php 21 Jan 2002 01:22:24 -0000
@@ -670,7 +670,7 @@
}
if (isset($h->from)) {
- $tmp = imap_rfc822_parse_adrlist($h->from, '');
+ $tmp = @imap_rfc822_parse_adrlist($h->from, '');
$tmp = $tmp[0];
$fullfrom = '';
---snip---
Jan.
--
::::::::::::::::::::::::::::::::::::::::
AMMMa AG - discover your knowledge
:::::::::::::::::::::::::::
Detmolder Str. 25-33 :: D-33604 Bielefeld
fon +49.521.96878-0 :: fax +49.521.96878-20
http://www.ammma.de
::::::::::::::::::::::::::::::::::::::::::::::