{"action":"opened","issue":{"url":"https://api.github.com/repos/hedii/Codeigniter-Forum/issues/8","repository_url":"https://api.github.com/repos/hedii/Codeigniter-Forum","labels_url":"https://api.github.com/repos/hedii/Codeigniter-Forum/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/hedii/Codeigniter-Forum/issues/8/comments","events_url":"https://api.github.com/repos/hedii/Codeigniter-Forum/issues/8/events","html_url":"https://github.com/hedii/Codeigniter-Forum/issues/8","id":187319995,"number":8,"title":"Registration send confirmation email","user":{"login":"helloworld415","id":23259719,"avatar_url":"https://avatars.githubusercontent.com/u/23259719?v=3","gravatar_id":"","url":"https://api.github.com/users/helloworld415","html_url":"https://github.com/helloworld415","followers_url":"https://api.github.com/users/helloworld415/followers","following_url":"https://api.github.com/users/helloworld415/following{/other_user}","gists_url":"https://api.github.com/users/helloworld415/gists{/gist_id}","starred_url":"https://api.github.com/users/helloworld415/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/helloworld415/subscriptions","organizations_url":"https://api.github.com/users/helloworld415/orgs","repos_url":"https://api.github.com/users/helloworld415/repos","events_url":"https://api.github.com/users/helloworld415/events{/privacy}","received_events_url":"https://api.github.com/users/helloworld415/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-04T12:21:08Z","updated_at":"2016-11-04T12:21:08Z","closed_at":null,"body":"this is your code below, but everytime I register new account  I always got this error but the data is stored in the database\r\n\r\n\r\n\r\n\r\nthis is the error \r\n\r\nA PHP Error was encountered\r\n\r\nSeverity: Warning\r\n\r\nMessage: mail(): Failed to connect to mailserver at \"localhost\" port 25, verify your \"SMTP\" and \"smtp_port\" setting in php.ini or use ini_set()\r\n\r\nFilename: libraries/Email.php\r\n\r\nLine Number: 1812\r\n\r\nBacktrace:\r\n\r\nFile: C:\\xampp\\htdocs\\Login_System\\application\\models\\User_model.php\r\nLine: 314\r\nFunction: send\r\n\r\nFile: C:\\xampp\\htdocs\\Login_System\\application\\models\\User_model.php\r\nLine: 45\r\nFunction: send_confirmation_email\r\n\r\nFile: C:\\xampp\\htdocs\\Login_System\\application\\controllers\\User.php\r\nLine: 113\r\nFunction: create_user\r\n\r\nFile: C:\\xampp\\htdocs\\Login_System\\index.php\r\nLine: 292\r\nFunction: require_once\r\n\r\n\r\n\r\n\r\nthis it your code in user model\r\n\r\nprivate function send_confirmation_email($username, $email) {\r\n\t\t\r\n\t\t// load email library and url helper\r\n\t\t$this->load->library('email');\r\n\t\t$this->load->helper('url');\r\n\t\t\r\n\t\t// get the site email address\r\n\t\t$email_address = $this->config->item('site_email');\r\n\t\t\r\n\t\t// initialize the email configuration\r\n\t\t$this->email->initialize(array(\r\n\t\t\t'mailtype' => 'html',\r\n\t\t\t'charset'  => 'utf-8'\r\n\t\t));\r\n\t\t\r\n\t\t// get user registration date\r\n\t\t$registration_date = $this->db->select('created_at')->from('users')->where('username', $username)->get()->row('created_at');\r\n\t\t\r\n\t\t// create a user email hash with user email and user registration date\r\n\t\t$hash = sha1($email . $registration_date);\r\n\t\t\r\n\t\t// prepare the email\r\n\t\t$this->email->from($email_address, $email_address);\r\n\t\t$this->email->to($email);\r\n\t\t$this->email->subject('Please confirm your email to validate your new user account.');\r\n\t\t$message  = '<!DOCTYPE HTML PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional //EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"><html xmlns=\"http://www.w3.org/1999/xhtml\"><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"></head><body>';\r\n\t\t$message .= \"Hi \" . $username . \",<br><br>\";\r\n\t\t$message .= \"Please click the link below to confirm your account on \" . base_url() . \"<br><br>\";\r\n\t\t$message .= \"Click this link: <a href=\\\"\" . base_url() . \"user/email_validation/\" . $username . \"/\" . $hash . \"\\\">Confirm your email and validate your account</a>\";\r\n\t\t$message .= \"</body></html>\";\r\n\t\t$this->email->message($message);\r\n\t\t\r\n\t\t// send the email and return status\r\n\t\treturn $this->email->send();\r\n\t\t\r\n\t}\r\n\r\n- \r\n\r\n- \r\n\r\n- \r\n\r\n- Please help me :( I like your work btw"}}
{"actor":{"display_login":"helloworld415"}}