{"action":"closed","issue":{"url":"https://api.github.com/repos/yesidlazaro/GmailBackground/issues/3","labels_url":"https://api.github.com/repos/yesidlazaro/GmailBackground/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/yesidlazaro/GmailBackground/issues/3/comments","events_url":"https://api.github.com/repos/yesidlazaro/GmailBackground/issues/3/events","html_url":"https://github.com/yesidlazaro/GmailBackground/issues/3","id":119298844,"number":3,"title":"Exception instead of sending email when calling send()","user":{"login":"Deepscorn","id":961834,"avatar_url":"https://avatars.githubusercontent.com/u/961834?v=3","gravatar_id":"","url":"https://api.github.com/users/Deepscorn","html_url":"https://github.com/Deepscorn","followers_url":"https://api.github.com/users/Deepscorn/followers","following_url":"https://api.github.com/users/Deepscorn/following{/other_user}","gists_url":"https://api.github.com/users/Deepscorn/gists{/gist_id}","starred_url":"https://api.github.com/users/Deepscorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Deepscorn/subscriptions","organizations_url":"https://api.github.com/users/Deepscorn/orgs","repos_url":"https://api.github.com/users/Deepscorn/repos","events_url":"https://api.github.com/users/Deepscorn/events{/privacy}","received_events_url":"https://api.github.com/users/Deepscorn/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-28T14:41:33Z","updated_at":"2015-11-28T14:47:15Z","closed_at":"2015-11-28T14:47:15Z","body":"Exception stack:\r\n\r\nCould not connect to SMTP host: smtp.gmail.com, port: 465\r\n11-28 09:36:11.391 10543-10587/ru.driverprofi.driverprofi W/System.err: javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465;\r\n11-28 09:36:11.391 10543-10587/ru.driverprofi.driverprofi W/System.err:   nested exception is:\r\n11-28 09:36:11.391 10543-10587/ru.driverprofi.driverprofi W/System.err: \tjavax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.\r\n11-28 09:36:11.392 10543-10587/ru.driverprofi.driverprofi W/System.err:     at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1391)\r\n11-28 09:36:11.392 10543-10587/ru.driverprofi.driverprofi W/System.err:     at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:412)\r\n11-28 09:36:11.392 10543-10587/ru.driverprofi.driverprofi W/System.err:     at javax.mail.Service.connect(Service.java:310)\r\n11-28 09:36:11.392 10543-10587/ru.driverprofi.driverprofi W/System.err:     at javax.mail.Service.connect(Service.java:169)\r\n11-28 09:36:11.392 10543-10587/ru.driverprofi.driverprofi W/System.err:     at javax.mail.Service.connect(Service.java:118)\r\n11-28 09:36:11.392 10543-10587/ru.driverprofi.driverprofi W/System.err:     at javax.mail.Transport.send0(Transport.java:188)\r\n11-28 09:36:11.392 10543-10587/ru.driverprofi.driverprofi W/System.err:     at javax.mail.Transport.send(Transport.java:118)\r\n\r\nCode to reproduce:\r\n\r\nBackgroundMail bm = new BackgroundMail(getActivity().getApplicationContext());\r\n        bm.setProcessVisibility(false);\r\n        bm.setGmailUserName(...);\r\n        bm.setGmailPassword(...);\r\n        bm.setMailTo(...);\r\n        bm.setFormSubject(...);\r\n        bm.setFormBody(...);\r\n        bm.send();\r\n\r\nMaybe it will help: http://developer.android.com/training/articles/security-ssl.html"}}