{"action":"closed","issue":{"url":"https://api.github.com/repos/openhab/openhab/issues/3338","repository_url":"https://api.github.com/repos/openhab/openhab","labels_url":"https://api.github.com/repos/openhab/openhab/issues/3338/labels{/name}","comments_url":"https://api.github.com/repos/openhab/openhab/issues/3338/comments","events_url":"https://api.github.com/repos/openhab/openhab/issues/3338/events","html_url":"https://github.com/openhab/openhab/issues/3338","id":113079276,"number":3338,"title":"Bugs in sendMail action","user":{"login":"Dan1001","id":4541543,"avatar_url":"https://avatars.githubusercontent.com/u/4541543?v=3","gravatar_id":"","url":"https://api.github.com/users/Dan1001","html_url":"https://github.com/Dan1001","followers_url":"https://api.github.com/users/Dan1001/followers","following_url":"https://api.github.com/users/Dan1001/following{/other_user}","gists_url":"https://api.github.com/users/Dan1001/gists{/gist_id}","starred_url":"https://api.github.com/users/Dan1001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dan1001/subscriptions","organizations_url":"https://api.github.com/users/Dan1001/orgs","repos_url":"https://api.github.com/users/Dan1001/repos","events_url":"https://api.github.com/users/Dan1001/events{/privacy}","received_events_url":"https://api.github.com/users/Dan1001/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/openhab/openhab/labels/wontfix","name":"wontfix","color":"ffffff"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":16,"created_at":"2015-10-23T18:52:26Z","updated_at":"2016-08-07T12:05:08Z","closed_at":"2016-08-07T12:05:07Z","body":" There are at least two bugs in the sendMail action\r\n\r\nFirst, image attachments arrive as a file called \"Attachment\" without a suffix/extension, and hence can't be opened on many systems.\r\n\r\nSecond, urls with basic authentication aren't accepted (i.e. username:password@), and give the error log I've copied below. Obviously a problem when using sendMail with webcam images.\r\n\r\n(Opening up a new issue because the old one was closed, and I'm not sure it's monitored; apologies if that's wrong and I'm just duplicating posts)\r\n\r\nthank you!\r\n\r\nDan\r\n\r\n18:02:29.826 ERROR o.o.action.mail.internal.Mail[:97]- Error adding attachment to email.\r\norg.apache.commons.mail.EmailException: Invalid URL set:http://admin:MYPASSWORD@192.168.1.145:80/dms.jpg\r\nat org.apache.commons.mail.MultiPartEmail.attach(MultiPartEmail.java:367)\r\nat org.apache.commons.mail.MultiPartEmail.attach(MultiPartEmail.java:311)\r\nat org.openhab.action.mail.internal.Mail.sendMail(Mail.java:93)\r\nat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\nat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\r\nat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\nCaused by: java.io.IOException: Server returned HTTP response code: 401 for URL: http://admin:MYPASSWORD@192.168.1.145:80/dms.jpg\r\nat sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1627)\r\nat java.net.URL.openStream(URL.java:1037)\r\nat org.apache.commons.mail.MultiPartEmail.attach(MultiPartEmail.java:362)\r\nat org.apache.commons.mail.MultiPartEmail.attach(MultiPartEmail.java:311)\r\nat org.openhab.action.mail.internal.Mail.sendMail(Mail.java:93)\r\nat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)"}}
{"actor":{"display_login":"9037568"}}