How can I send email from localhost using my gmail account. - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: How can I send email from localhost using my gmail account. (/showthread.php?tid=18222) |
How can I send email from localhost using my gmail account. - El Forum - 04-29-2009 [eluser]Arun Joshi[/eluser] Hi, How to send email from localhost using gmail account? How can I send email from localhost using my gmail account. - El Forum - 04-29-2009 [eluser]Arun Joshi[/eluser] After 20 minutes CI forum searching I got the solution. :coolsmile: $config = Array( 'protocol' => 'smtp', 'smtp_host' => 'ssl://smtp.googlemail.com', 'smtp_port' => 465, 'smtp_user' => '[email protected]', 'smtp_pass' => 'mypassword', ); $this->load->library('email', $config); $this->email->set_newline("\r\n"); $this->email->from('[email protected]', 'Mr. Test'); $this->email->to('[email protected]'); $this->email->subject(' My mail through codeigniter from localhost '); $this->email->message('Hello World...'); if (!$this->email->send()) show_error($this->email->print_debugger()); else echo 'Your e-mail has been sent!'; Got Solution from this thread http://ellislab.com/forums/viewthread/84689/ Anyway Thanks How can I send email from localhost using my gmail account. - El Forum - 04-29-2009 [eluser]Mike Ryan[/eluser] You can find some good tutorials on this site ;-) How can I send email from localhost using my gmail account. - El Forum - 04-29-2009 [eluser]Dam1an[/eluser] @arun, glad you got it sorted, but can you please use [ code ] tags in future, reading non formatted code gives me headaches How can I send email from localhost using my gmail account. - El Forum - 04-30-2009 [eluser]Arun Joshi[/eluser] Sure, I will use code window. Thanks Mr.Dam1an. How can I send email from localhost using my gmail account. - El Forum - 08-13-2014 [eluser]Musaddiq Khan[/eluser] I have used the following code and it generate some errors. Code: $config = Array( How can I send email from localhost using my gmail account. - El Forum - 08-13-2014 [eluser]CroNiX[/eluser] it's saying you don't have the SSL protocol installed/enabled on your web server, so CI (or anything php) can't use SSL until you do that. How can I send email from localhost using my gmail account. - El Forum - 08-13-2014 [eluser]InsiteFX[/eluser] apache server - httpd.conf Code: // remove the pound sign from the beginning. php - php.ini Code: // remove the semi-colon from the beginning of it. How can I send email from localhost using my gmail account. - El Forum - 08-13-2014 [eluser]CroNiX[/eluser] Also has to be enabled in the webserver for php to use it. |