{"action":"reopened","issue":{"url":"https://api.github.com/repos/PHPMailer/PHPMailer/issues/509","labels_url":"https://api.github.com/repos/PHPMailer/PHPMailer/issues/509/labels{/name}","comments_url":"https://api.github.com/repos/PHPMailer/PHPMailer/issues/509/comments","events_url":"https://api.github.com/repos/PHPMailer/PHPMailer/issues/509/events","html_url":"https://github.com/PHPMailer/PHPMailer/issues/509","id":108077503,"number":509,"title":"detailed error string when popBeforeSmtp() or send() fails","user":{"login":"nbsbhat","id":3170544,"avatar_url":"https://avatars.githubusercontent.com/u/3170544?v=3","gravatar_id":"","url":"https://api.github.com/users/nbsbhat","html_url":"https://github.com/nbsbhat","followers_url":"https://api.github.com/users/nbsbhat/followers","following_url":"https://api.github.com/users/nbsbhat/following{/other_user}","gists_url":"https://api.github.com/users/nbsbhat/gists{/gist_id}","starred_url":"https://api.github.com/users/nbsbhat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nbsbhat/subscriptions","organizations_url":"https://api.github.com/users/nbsbhat/orgs","repos_url":"https://api.github.com/users/nbsbhat/repos","events_url":"https://api.github.com/users/nbsbhat/events{/privacy}","received_events_url":"https://api.github.com/users/nbsbhat/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-24T07:49:44Z","updated_at":"2015-09-24T08:13:38Z","closed_at":null,"body":"Hi Synchro,\r\n\r\nCould you please let me know if there is a way to fetch the detailed error string from a failed connect attempt to pop3/smtp?\r\n\r\nFrom https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting, I could get to the root of the problem (using DEBUG level > 1, telnet to port 25, etc).\r\nHowever, this is manual debugging. Can I log detailed error string in the application log to be able to see what is going wrong?\r\n\r\n$mail->ErrorInfo or $e->getMessage() provides generic error:\r\nSMTP connect() failed.\r\n\r\nwhereas the real problem was connecting to the email server due to 'smtp port being changed':\r\nSMTP ERROR: Failed to connect to server: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.\r\nOr it could also be due to other changes:\r\n- email server policy getting updated that blocks ports when there was software update\r\n- DNS changes or proxy updates, etc\r\n\r\nIf I get to print the detailed error message such as the above on to an application log, the level-1 application support guys will be quickly able to action on the issue.\r\n\r\nI guess there is a way to get this detailed error; but i can't see how?\r\n\r\nThanks much,\r\nNarayan"}}