{"action":"opened","issue":{"url":"https://api.github.com/repos/guldgruppen/BookingSystem/issues/13","labels_url":"https://api.github.com/repos/guldgruppen/BookingSystem/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/guldgruppen/BookingSystem/issues/13/comments","events_url":"https://api.github.com/repos/guldgruppen/BookingSystem/issues/13/events","html_url":"https://github.com/guldgruppen/BookingSystem/issues/13","id":119668971,"number":13,"title":"E-mail Validering","user":{"login":"Meihlen","id":15776839,"avatar_url":"https://avatars.githubusercontent.com/u/15776839?v=3","gravatar_id":"","url":"https://api.github.com/users/Meihlen","html_url":"https://github.com/Meihlen","followers_url":"https://api.github.com/users/Meihlen/followers","following_url":"https://api.github.com/users/Meihlen/following{/other_user}","gists_url":"https://api.github.com/users/Meihlen/gists{/gist_id}","starred_url":"https://api.github.com/users/Meihlen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Meihlen/subscriptions","organizations_url":"https://api.github.com/users/Meihlen/orgs","repos_url":"https://api.github.com/users/Meihlen/repos","events_url":"https://api.github.com/users/Meihlen/events{/privacy}","received_events_url":"https://api.github.com/users/Meihlen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-01T08:48:11Z","updated_at":"2015-12-01T08:48:11Z","closed_at":null,"body":"public static bool Email(string emailaddress, bool onlinestatus = false)\r\n        {\r\n            bool status = false;\r\n\r\n            Match match = Regex.Match(emailaddress, @\"^([\\w-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([\\w-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$\",\r\n                    RegexOptions.IgnoreCase);\r\n            if (match.Success)\r\n            {\r\n                status = true;\r\n                if (onlinestatus == true)\r\n                {\r\n                    int index = emailaddress.IndexOf('@');\r\n                    string s = emailaddress.Substring(index + 1);\r\n\r\n                    System.Net.HttpWebRequest request = (System.Net.HttpWebRequest)System.Net.HttpWebRequest.Create(\"http://www.\" + s);\r\n                    request.AllowAutoRedirect = false; // find out if this site is up and don't follow a redirector\r\n                    request.Method = \"HEAD\";\r\n                    try\r\n                    {\r\n                        if (request.GetResponse() != null)\r\n                        {\r\n                            status = true;\r\n                        }\r\n                    }\r\n                    catch\r\n                    {\r\n                        status = false;\r\n                    }\r\n                }\r\n            }\r\n            return status;\r\n        }"}}