{"action":"created","issue":{"url":"https://api.github.com/repos/cve-search/cve-search/issues/155","repository_url":"https://api.github.com/repos/cve-search/cve-search","labels_url":"https://api.github.com/repos/cve-search/cve-search/issues/155/labels{/name}","comments_url":"https://api.github.com/repos/cve-search/cve-search/issues/155/comments","events_url":"https://api.github.com/repos/cve-search/cve-search/issues/155/events","html_url":"https://github.com/cve-search/cve-search/issues/155","id":147994775,"number":155,"title":"Add a send Email button","user":{"login":"danje57","id":16591723,"avatar_url":"https://avatars.githubusercontent.com/u/16591723?v=3","gravatar_id":"","url":"https://api.github.com/users/danje57","html_url":"https://github.com/danje57","followers_url":"https://api.github.com/users/danje57/followers","following_url":"https://api.github.com/users/danje57/following{/other_user}","gists_url":"https://api.github.com/users/danje57/gists{/gist_id}","starred_url":"https://api.github.com/users/danje57/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danje57/subscriptions","organizations_url":"https://api.github.com/users/danje57/orgs","repos_url":"https://api.github.com/users/danje57/repos","events_url":"https://api.github.com/users/danje57/events{/privacy}","received_events_url":"https://api.github.com/users/danje57/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-04-13T09:06:50Z","updated_at":"2016-05-10T08:57:13Z","closed_at":"2016-05-10T08:57:13Z","body":"Hi,\r\n\r\nI try to add a Email button on the table.html template\r\n\r\nThe email button should send an email to our help desk which could create a ticket to the appropriate team.\r\n\r\nSo I put a button before the ID column of the table.html template.\r\n\r\nI've created a javascript that retrieve information regarding the CVE, using:\r\n\r\n{{ c['summary'] }}\r\n{{ c['references'] }}\r\n{{ c['vulnerable_configuration'] }}\r\n{{ c['Modified']|currentTime }}\r\n{{ c['Published']|currentTime }}\r\n{{ c['last-modified']|currentTime }}\r\n\r\nI put the variable which I could like to use to build my email:\r\n`<button type=\"button\" onclick=\"sendemail('{{ c['id'] }}','{{ c['summary'] }}','{{ c['Published']|currentTime }}')\">Mail it!</button>`\r\n\r\n\r\nThe button call the sendemail function\r\n\r\n    function sendemail(id,summary,published){\r\n        to = \"xyz@xyz.com\";\r\n        from = \"xyz@xyz.com\";\r\n        subject = \"CVE of the day - \" + id;\r\n        message = \"Dear Helpesk,\\n\\n\\n Could you please open a ticket to the appropriate team regarding this CVE.\\n\\n\";\r\n        message = message + \"Published Date: \" + published + \"\\n\";\r\n        message = message + \"ID: \" + id + \"\\n\\n\";\r\n        message = message + \"Description: \" + summary + \"\\n\\n\";\r\n        message = message + \"To avoid any false positive, please, send us information regarding your managed devices in order to complete our CMDB.\\n\\nRegards\\n\\n\\nYour security Team.\\n\\n\";\r\n    }\r\n\r\nNow I'm stuck to send the email.\r\n\r\nI don't know how to send it :-/ do you have some ideas?"},"comment":{"url":"https://api.github.com/repos/cve-search/cve-search/issues/comments/218098281","html_url":"https://github.com/cve-search/cve-search/issues/155#issuecomment-218098281","issue_url":"https://api.github.com/repos/cve-search/cve-search/issues/155","id":218098281,"user":{"login":"PidgeyL","id":8830839,"avatar_url":"https://avatars.githubusercontent.com/u/8830839?v=3","gravatar_id":"","url":"https://api.github.com/users/PidgeyL","html_url":"https://github.com/PidgeyL","followers_url":"https://api.github.com/users/PidgeyL/followers","following_url":"https://api.github.com/users/PidgeyL/following{/other_user}","gists_url":"https://api.github.com/users/PidgeyL/gists{/gist_id}","starred_url":"https://api.github.com/users/PidgeyL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PidgeyL/subscriptions","organizations_url":"https://api.github.com/users/PidgeyL/orgs","repos_url":"https://api.github.com/users/PidgeyL/repos","events_url":"https://api.github.com/users/PidgeyL/events{/privacy}","received_events_url":"https://api.github.com/users/PidgeyL/received_events","type":"User","site_admin":false},"created_at":"2016-05-10T08:57:13Z","updated_at":"2016-05-10T08:57:13Z","body":"The plug-in is created. You can find the plug-in [here](https://github.com/cve-search/Plugins/tree/master/plugins/sendMail), and you can find the installation guide in the root of the repo. If you have any questions, let me know."}}