- if (strtolower(substr($read[$i], 0, 5)) == "from:") {
- $from = sqimap_find_displayable_name(substr($read[$i], 5));
- } else if (strtolower(substr($read[$i], 0, 5)) == "date:") {
+ if ($sent == true) {
+ if (strtolower(substr($read[$i], 0, 3)) == "to:")
+ $from = sqimap_find_displayable_name(substr($read[$i], 3));
+ } else {
+ if (strtolower(substr($read[$i], 0, 5)) == "from:")
+ $from = sqimap_find_displayable_name(substr($read[$i], 5));
+ }
+
+ if (strtolower(substr($read[$i], 0, 5)) == "date:") {