{"action":"created","issue":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/11432","repository_url":"https://api.github.com/repos/cakephp/cakephp","labels_url":"https://api.github.com/repos/cakephp/cakephp/issues/11432/labels{/name}","comments_url":"https://api.github.com/repos/cakephp/cakephp/issues/11432/comments","events_url":"https://api.github.com/repos/cakephp/cakephp/issues/11432/events","html_url":"https://github.com/cakephp/cakephp/issues/11432","id":274543102,"number":11432,"title":"Cake 2: Catch block not executing even if recipient email doesn't exist","user":{"login":"charliwize","id":5395095,"avatar_url":"https://avatars1.githubusercontent.com/u/5395095?v=4","gravatar_id":"","url":"https://api.github.com/users/charliwize","html_url":"https://github.com/charliwize","followers_url":"https://api.github.com/users/charliwize/followers","following_url":"https://api.github.com/users/charliwize/following{/other_user}","gists_url":"https://api.github.com/users/charliwize/gists{/gist_id}","starred_url":"https://api.github.com/users/charliwize/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charliwize/subscriptions","organizations_url":"https://api.github.com/users/charliwize/orgs","repos_url":"https://api.github.com/users/charliwize/repos","events_url":"https://api.github.com/users/charliwize/events{/privacy}","received_events_url":"https://api.github.com/users/charliwize/received_events","type":"User","site_admin":false},"labels":[{"id":60506331,"url":"https://api.github.com/repos/cakephp/cakephp/labels/mailer","name":"mailer","color":"FFFFFF","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/cakephp/cakephp/milestones/150","html_url":"https://github.com/cakephp/cakephp/milestone/150","labels_url":"https://api.github.com/repos/cakephp/cakephp/milestones/150/labels","id":2849502,"number":150,"title":"2.10.5","description":"Bugfixes for 2.10.x","creator":{"login":"markstory","id":24086,"avatar_url":"https://avatars3.githubusercontent.com/u/24086?v=4","gravatar_id":"","url":"https://api.github.com/users/markstory","html_url":"https://github.com/markstory","followers_url":"https://api.github.com/users/markstory/followers","following_url":"https://api.github.com/users/markstory/following{/other_user}","gists_url":"https://api.github.com/users/markstory/gists{/gist_id}","starred_url":"https://api.github.com/users/markstory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markstory/subscriptions","organizations_url":"https://api.github.com/users/markstory/orgs","repos_url":"https://api.github.com/users/markstory/repos","events_url":"https://api.github.com/users/markstory/events{/privacy}","received_events_url":"https://api.github.com/users/markstory/received_events","type":"User","site_admin":false},"open_issues":16,"closed_issues":8,"state":"open","created_at":"2017-10-19T02:07:12Z","updated_at":"2017-11-16T14:58:25Z","due_on":"2017-11-19T08:00:00Z","closed_at":null},"comments":3,"created_at":"2017-11-16T14:52:01Z","updated_at":"2017-11-16T15:10:35Z","closed_at":"2017-11-16T14:58:25Z","author_association":"NONE","body":"This is a (multiple allowed):\r\n\r\n* [ ] bug\r\n* [ ] enhancement\r\n* [x] Question\r\n* [x] feature-discussion (RFC)\r\n\r\n* CakePHP Version: EXACT RELEASE VERSION OR COMMIT HASH, HERE.\r\n* Platform and Target: YOUR WEB-SERVER, DATABASE AND OTHER RELEVANT INFO AND HOW THE REQUEST IS BEING MADE, HERE.\r\n\r\n### What you did\r\n I am using cakePHP 2\r\n\r\nis there a way in cakePHP to check if an email is delivered or not. I have tried to catch error when $Email->send(); executes. But this always returns some string containing the sent message body etc.\r\n\r\nFor example I have this:\r\n\r\n     ```\r\n    try {\r\n        $to = $message_data['email'];\r\n        if (isset($message_data['name'])) {\r\n            $to = array($message_data['email'] => $message_data['name']);\r\n        }\r\n        $Email->template($template, 'default')\r\n            ->from($sender)\r\n            ->to(\"c.chardkhkhjfsd@gmail.com\")\r\n            ->subject($message_data['subject'])\r\n            ->emailFormat('html');\r\n\r\n        if ($replyTo) {\r\n            $Email->replyTo($replyTo);\r\n        }\r\n\r\n        if (isset($message_data['attachment'])) {\r\n            $Email->attachments(array(\r\n                $message_data['filename'] => array(\r\n                    'data' => $message_data['attachment'],\r\n                    'mimetype' => $message_data['attachment_mimetype']\r\n                )\r\n            ));\r\n        }\r\n        $Email->send();     \r\n    } catch (SocketException $e) {\r\n        Debugger::log(\"no way\");\r\n    }\r\n\r\n```\r\nMy smtp setup is like this:\r\n\r\n    ```\r\npublic $test = array(\r\n      'transport' => 'Smtp',\r\n      'tls' => true,\r\n      'from' => array('*************' => '****'),\r\n      'host' => 'smtp.gmail.com',\r\n      'port' => 587,\r\n      'timeout' => 30,\r\n      'client' => null,\r\n      'log' => false,\r\n      'username' => '***************',\r\n      'password' => ''\r\n   );\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/comments/344951897","html_url":"https://github.com/cakephp/cakephp/issues/11432#issuecomment-344951897","issue_url":"https://api.github.com/repos/cakephp/cakephp/issues/11432","id":344951897,"user":{"login":"charliwize","id":5395095,"avatar_url":"https://avatars1.githubusercontent.com/u/5395095?v=4","gravatar_id":"","url":"https://api.github.com/users/charliwize","html_url":"https://github.com/charliwize","followers_url":"https://api.github.com/users/charliwize/followers","following_url":"https://api.github.com/users/charliwize/following{/other_user}","gists_url":"https://api.github.com/users/charliwize/gists{/gist_id}","starred_url":"https://api.github.com/users/charliwize/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charliwize/subscriptions","organizations_url":"https://api.github.com/users/charliwize/orgs","repos_url":"https://api.github.com/users/charliwize/repos","events_url":"https://api.github.com/users/charliwize/events{/privacy}","received_events_url":"https://api.github.com/users/charliwize/received_events","type":"User","site_admin":false},"created_at":"2017-11-16T15:10:35Z","updated_at":"2017-11-16T15:10:35Z","author_association":"NONE","body":"i am sorry if I am not understanding you but are you asking me to change the host from `smtp.gmail.com` to `example.com`"}}
{"actor":{"display_login":"charliwize"}}