{"action":"created","issue":{"url":"https://api.github.com/repos/tedious/Fetch/issues/95","labels_url":"https://api.github.com/repos/tedious/Fetch/issues/95/labels{/name}","comments_url":"https://api.github.com/repos/tedious/Fetch/issues/95/comments","events_url":"https://api.github.com/repos/tedious/Fetch/issues/95/events","html_url":"https://github.com/tedious/Fetch/issues/95","id":46558892,"number":95,"title":"Undefined property: stdClass::$host","user":{"login":"gpilla","id":5465517,"avatar_url":"https://avatars.githubusercontent.com/u/5465517?v=3","gravatar_id":"","url":"https://api.github.com/users/gpilla","html_url":"https://github.com/gpilla","followers_url":"https://api.github.com/users/gpilla/followers","following_url":"https://api.github.com/users/gpilla/following{/other_user}","gists_url":"https://api.github.com/users/gpilla/gists{/gist_id}","starred_url":"https://api.github.com/users/gpilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gpilla/subscriptions","organizations_url":"https://api.github.com/users/gpilla/orgs","repos_url":"https://api.github.com/users/gpilla/repos","events_url":"https://api.github.com/users/gpilla/events{/privacy}","received_events_url":"https://api.github.com/users/gpilla/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2014-10-22T20:49:45Z","updated_at":"2015-02-15T21:44:01Z","closed_at":"2015-02-15T21:44:01Z","body":"Undefined property: stdClass::$host\r\n\r\n... /vendor/tedivm/fetch/src/Fetch/Message.php:573\r\n\r\n\r\nIt can be reproduced when the To header is not an email.\r\n\r\nExample:\r\n``\r\nTo: undisclosed-recipients:;\r\n``\r\n\r\nIt happened when i received a email from a Redmine app.\r\n\r\nI fast fixed adding this:\r\n\r\n```php\r\n$currentAddress['address'] = $address->mailbox . '@' . $address->host;\r\nif (isset($address->personal))\r\n    $currentAddress['name'] = $address->personal;\r\n$outputAddresses[] = $currentAddress;\r\n```\r\n\r\nChanging with this...\r\n\r\n```php\r\nif (property_exists($address, 'mailbox') && $address->mailbox != 'undisclosed-recipients') {\r\n     $currentAddress['address'] = $address->mailbox . '@' . $address->host;\r\n     if (isset($address->personal))\r\n        $currentAddress['name'] = $address->personal;\r\n        $outputAddresses[] = $currentAddress;\r\n}\r\n```\r\n\r\nI know that is a fast and quite dirty solution.\r\n\r\nSorry for my english."},"comment":{"url":"https://api.github.com/repos/tedious/Fetch/issues/comments/74438756","html_url":"https://github.com/tedious/Fetch/issues/95#issuecomment-74438756","issue_url":"https://api.github.com/repos/tedious/Fetch/issues/95","id":74438756,"user":{"login":"gpilla","id":5465517,"avatar_url":"https://avatars.githubusercontent.com/u/5465517?v=3","gravatar_id":"","url":"https://api.github.com/users/gpilla","html_url":"https://github.com/gpilla","followers_url":"https://api.github.com/users/gpilla/followers","following_url":"https://api.github.com/users/gpilla/following{/other_user}","gists_url":"https://api.github.com/users/gpilla/gists{/gist_id}","starred_url":"https://api.github.com/users/gpilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gpilla/subscriptions","organizations_url":"https://api.github.com/users/gpilla/orgs","repos_url":"https://api.github.com/users/gpilla/repos","events_url":"https://api.github.com/users/gpilla/events{/privacy}","received_events_url":"https://api.github.com/users/gpilla/received_events","type":"User","site_admin":false},"created_at":"2015-02-15T21:44:01Z","updated_at":"2015-02-15T21:44:01Z","body":"This should be closed, maybe there is better solutions, but is working now."}}