if (strlen(trim($hdr->subject)) == 0) {
$hdr->subject = _("(no subject)");
}
- if (strlen(trim($hdr->from)) == 0) {
+ if (!is_object($hdr->from) && strlen(trim($hdr->from)) == 0) {
$hdr->from = _("(unknown sender)");
}
if (strlen(trim($hdr->date)) == 0) {
}
$i++;
break;
+ case 'u':
+ /* User-Agent */
+ if (strtolower(substr($line,0,10)) == 'user-agent') {
+ $hdr->xmailer = trim(substr($line, 10));
+ }
+ $i++;
+ break;
default:
$i++;
break;
$name = substr($address,0,$addr_start);
}
$at = strpos($addr, '@');
- $addr_structure = new address_structure();
+ $addr_structure = new AddressStructure();
$addr_structure->personal = $name;
$addr_structure->group = $group;
$name = substr($address,0,$addr_start);
}
$at = strpos($addr, '@');
- $addr_structure = new address_structure();
+ $addr_structure = new AddressStructure();
$addr_structure->group = $group;
if ($at) {
$addr_structure->mailbox = trim(substr($addr,0,$at));
}
}
-?>
\ No newline at end of file
+?>