Email sending issue.... |
[eluser]rafi_ccj[/eluser]
i am having problem in sending email ... this is the code <code> function email_send() { $to = '[email protected]';//$this->input->post('email'); $con = array( 'protocol' => 'smtp', 'smtp_host' => 'something', 'smtp_port' => 465, 'smtp_user' => '[email protected]', 'smtp_pass' => '123456' ); $this->load->library('email', $con); $this->email->set_newline("\r\n"); $this->email->from('[email protected]', 'ME'); $this->email->to($to); $this->email->subject('Welcome to Gramweb'); $this->email->message('Congratulation! Your account has successfully been created. Now Cheers!!!'); if ($this->email->send()) { echo 'Email sent successful!.'; } else { show_error($this->email->print_debugger()); } } </code> but i am having this problem..... <code> A PHP Error was encountered Severity: Warning Message: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() Filename: libraries/Email.php Line Number: 1553 </code> give me a solution!!!
[eluser]InsiteFX[/eluser]
Your answer is in the Error! Setup your php.ini file to use smtp
[eluser]rafi_ccj[/eluser]
can you please tell me how to setup the php.ini file to send email please? i am new here!
[eluser]Jason Stanley[/eluser]
Google it. When you upload your site to a web server it will probably magically start working as your web server will be configured correctly. As you are working on your computer and do not have a mail server on your computer it isn't working.
[eluser]rafi_ccj[/eluser]
i did google it....and tried what is said there...that doesn't help me can you please anyone help me???
[eluser]Jason Stanley[/eluser]
What are you using? XAMPP / MAMP / Self configured LAMP install?
[eluser]InsiteFX[/eluser]
Example - php.ini Code: [mail function] Make sure the mod_ssl is installed! |
Welcome Guest, Not a member yet? Register Sign In |