{"action":"opened","issue":{"url":"https://api.github.com/repos/idea2-platform/pepito-test/issues/966","repository_url":"https://api.github.com/repos/idea2-platform/pepito-test","labels_url":"https://api.github.com/repos/idea2-platform/pepito-test/issues/966/labels{/name}","comments_url":"https://api.github.com/repos/idea2-platform/pepito-test/issues/966/comments","events_url":"https://api.github.com/repos/idea2-platform/pepito-test/issues/966/events","html_url":"https://github.com/idea2-platform/pepito-test/issues/966","id":168917783,"number":966,"title":"IP-1597. Email endpoint","user":{"login":"idea2-pepito","id":20704124,"avatar_url":"https://avatars.githubusercontent.com/u/20704124?v=3","gravatar_id":"","url":"https://api.github.com/users/idea2-pepito","html_url":"https://github.com/idea2-pepito","followers_url":"https://api.github.com/users/idea2-pepito/followers","following_url":"https://api.github.com/users/idea2-pepito/following{/other_user}","gists_url":"https://api.github.com/users/idea2-pepito/gists{/gist_id}","starred_url":"https://api.github.com/users/idea2-pepito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/idea2-pepito/subscriptions","organizations_url":"https://api.github.com/users/idea2-pepito/orgs","repos_url":"https://api.github.com/users/idea2-pepito/repos","events_url":"https://api.github.com/users/idea2-pepito/events{/privacy}","received_events_url":"https://api.github.com/users/idea2-pepito/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"dgaviola","id":190500,"avatar_url":"https://avatars.githubusercontent.com/u/190500?v=3","gravatar_id":"","url":"https://api.github.com/users/dgaviola","html_url":"https://github.com/dgaviola","followers_url":"https://api.github.com/users/dgaviola/followers","following_url":"https://api.github.com/users/dgaviola/following{/other_user}","gists_url":"https://api.github.com/users/dgaviola/gists{/gist_id}","starred_url":"https://api.github.com/users/dgaviola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgaviola/subscriptions","organizations_url":"https://api.github.com/users/dgaviola/orgs","repos_url":"https://api.github.com/users/dgaviola/repos","events_url":"https://api.github.com/users/dgaviola/events{/privacy}","received_events_url":"https://api.github.com/users/dgaviola/received_events","type":"User","site_admin":false},"assignees":[{"login":"dgaviola","id":190500,"avatar_url":"https://avatars.githubusercontent.com/u/190500?v=3","gravatar_id":"","url":"https://api.github.com/users/dgaviola","html_url":"https://github.com/dgaviola","followers_url":"https://api.github.com/users/dgaviola/followers","following_url":"https://api.github.com/users/dgaviola/following{/other_user}","gists_url":"https://api.github.com/users/dgaviola/gists{/gist_id}","starred_url":"https://api.github.com/users/dgaviola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgaviola/subscriptions","organizations_url":"https://api.github.com/users/dgaviola/orgs","repos_url":"https://api.github.com/users/dgaviola/repos","events_url":"https://api.github.com/users/dgaviola/events{/privacy}","received_events_url":"https://api.github.com/users/dgaviola/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/idea2-platform/pepito-test/milestones/104","html_url":"https://github.com/idea2-platform/pepito-test/milestones/iteration%2021","labels_url":"https://api.github.com/repos/idea2-platform/pepito-test/milestones/104/labels","id":1896938,"number":104,"title":"iteration 21","description":"","creator":{"login":"dgaviola","id":190500,"avatar_url":"https://avatars.githubusercontent.com/u/190500?v=3","gravatar_id":"","url":"https://api.github.com/users/dgaviola","html_url":"https://github.com/dgaviola","followers_url":"https://api.github.com/users/dgaviola/followers","following_url":"https://api.github.com/users/dgaviola/following{/other_user}","gists_url":"https://api.github.com/users/dgaviola/gists{/gist_id}","starred_url":"https://api.github.com/users/dgaviola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgaviola/subscriptions","organizations_url":"https://api.github.com/users/dgaviola/orgs","repos_url":"https://api.github.com/users/dgaviola/repos","events_url":"https://api.github.com/users/dgaviola/events{/privacy}","received_events_url":"https://api.github.com/users/dgaviola/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":6,"state":"closed","created_at":"2016-07-21T15:35:58Z","updated_at":"2016-08-02T15:37:52Z","due_on":null,"closed_at":"2016-07-21T15:35:58Z"},"comments":0,"created_at":"2016-08-02T15:37:53Z","updated_at":"2016-08-02T15:37:53Z","closed_at":null,"body":"We have to create a new email endpoint that can listen to an email address and retrieve new emails. Due to limitations with POP3 about determining new emails we will only support IMAPS (note that SSL support will be required to ensure security).\r\n\r\nBasically there will be only one event named 'inboundEmailReceived' that happens when a new email is detected.\r\n\r\nData that goes to the event to have the following format:\r\n\r\n- fromName\r\n- fromEmail\r\n- date\r\n- subject\r\n- textBody\r\n- htmlBody\r\n- attachments (array)\r\n-- name\r\n-- contentType\r\n-- content (encoded in Base64)\n\n**dgaviola added a comment - Mon Jul 28 2014 14:18:15 GMT-0000 (UTC)**\n\nA sample integration point could have this script:\r\n\r\n```\r\nvar record = idea2.api.data.createEmpty('test1');\r\nrecord.data('name', data.subject);\r\nrecord.data('textBody', data.textBody);\r\nrecord.data('htmlBody', data.htmlBody);\r\nif (data.attachments) {\r\n    for (var i in data.attachments) {\r\n        record.push('attachments', data.attachments<i>);\r\n    }\r\n}\r\nidea2.api.data.save(record);\r\n```\n\n**dgaviola added a comment - Mon Jul 28 2014 14:20:48 GMT-0000 (UTC)**\n\nIn order to test with Gmail it is better to create a new label and set it as the checking folder. Otherwise it will try to retrieve all email, what takes a lot of time. Also remember that for username in Gmail you have to replace @ by %40. Finally, here is a sample configuration for Gmail to keep as testing reference:\r\n\r\n```\r\nimapServer=imap.gmail.com\r\nimapPort=993\r\nimapUser=your_user%40gmail.com\r\nimapPassword=your_password\r\nimapFolder=Test\r\nimapMoveToFolder=<Gmail>/Trash\r\nimapcheckFrequency=5000\r\n```\n"}}
{"actor":{"display_login":"idea2-pepito"}}