{"action":"created","issue":{"url":"https://api.github.com/repos/PHPMailer/PHPMailer/issues/612","labels_url":"https://api.github.com/repos/PHPMailer/PHPMailer/issues/612/labels{/name}","comments_url":"https://api.github.com/repos/PHPMailer/PHPMailer/issues/612/comments","events_url":"https://api.github.com/repos/PHPMailer/PHPMailer/issues/612/events","html_url":"https://github.com/PHPMailer/PHPMailer/issues/612","id":129359258,"number":612,"title":"Create a diagnostic utility","user":{"login":"Synchro","id":81561,"avatar_url":"https://avatars.githubusercontent.com/u/81561?v=3","gravatar_id":"","url":"https://api.github.com/users/Synchro","html_url":"https://github.com/Synchro","followers_url":"https://api.github.com/users/Synchro/followers","following_url":"https://api.github.com/users/Synchro/following{/other_user}","gists_url":"https://api.github.com/users/Synchro/gists{/gist_id}","starred_url":"https://api.github.com/users/Synchro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Synchro/subscriptions","organizations_url":"https://api.github.com/users/Synchro/orgs","repos_url":"https://api.github.com/users/Synchro/repos","events_url":"https://api.github.com/users/Synchro/events{/privacy}","received_events_url":"https://api.github.com/users/Synchro/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/PHPMailer/PHPMailer/labels/Feature%20request","name":"Feature request","color":"02e10c"},{"url":"https://api.github.com/repos/PHPMailer/PHPMailer/labels/Help%20needed","name":"Help needed","color":"E68021"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-28T06:49:37Z","updated_at":"2016-01-28T08:51:28Z","closed_at":null,"body":"So many questions on SO and issues raised in here are addressed by [the troubleshooting guide](https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting), but many seem unable to heed its advice. I propose creating a utility function that tries to diagnose a PHPMailer config issue by running through all the tests suggested in the guide in an automated fashion, producing diagnostic output that will direct the user to an appropriate fix."},"comment":{"url":"https://api.github.com/repos/PHPMailer/PHPMailer/issues/comments/176066564","html_url":"https://github.com/PHPMailer/PHPMailer/issues/612#issuecomment-176066564","issue_url":"https://api.github.com/repos/PHPMailer/PHPMailer/issues/612","id":176066564,"user":{"login":"Synchro","id":81561,"avatar_url":"https://avatars.githubusercontent.com/u/81561?v=3","gravatar_id":"","url":"https://api.github.com/users/Synchro","html_url":"https://github.com/Synchro","followers_url":"https://api.github.com/users/Synchro/followers","following_url":"https://api.github.com/users/Synchro/following{/other_user}","gists_url":"https://api.github.com/users/Synchro/gists{/gist_id}","starred_url":"https://api.github.com/users/Synchro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Synchro/subscriptions","organizations_url":"https://api.github.com/users/Synchro/orgs","repos_url":"https://api.github.com/users/Synchro/repos","events_url":"https://api.github.com/users/Synchro/events{/privacy}","received_events_url":"https://api.github.com/users/Synchro/received_events","type":"User","site_admin":false},"created_at":"2016-01-28T08:51:28Z","updated_at":"2016-01-28T08:51:28Z","body":"No, not automatically as it's too intrusive, but many have no idea how to even get to a command line on their server, let alone install/run telnet or do DNS lookups, check SSL certs. It may still lead to duplicate questions on SO for those incapable of reading an error message, but it would make them much simpler to deal with.\r\n\r\nI think the most effective way would be to implement it as a method that you would call just before or after `send()` - perhaps adjust the examples to call it if a send fails, perhaps:\r\n\r\n```php\r\nif ($mail->send()) {\r\n    echo 'yay!';\r\n} else {\r\n    echo $mail->diagnose();\r\n}\r\n```\r\nWe could also make the error message pointing at the guide a bit harder to ignore!\r\n\r\n```\r\nThere was a problem sending your message.\r\n ____  _____    _    ____    _____ _   _ ___ ____  _\r\n|  _ \\| ____|  / \\  |  _ \\  |_   _| | | |_ _/ ___|| |\r\n| |_) |  _|   / _ \\ | | | |   | | | |_| || |\\___ \\| |\r\n|  _ <| |___ / ___ \\| |_| |   | | |  _  || | ___) |_|\r\n|_| \\_\\_____/_/   \\_\\____/    |_| |_| |_|___|____/(_)\r\nBefore asking a question on SO or opening an issue on github, read this page:\r\nhttps://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting\r\n```"}}