Gmail mailing error |
[eluser]Unknown[/eluser]
<?php Class Community extends CI_Controller{ function index(){ $config = Array( 'protocol' => 'smtp', 'smtp_host' => 'ssl://smtp.googlemail.com', 'smtp_port' => 587, //I've also tried using port 465 'smtp_user' => '[email protected]', 'smtp_pass' => 'xxxx', 'mailtype' => 'html', 'charset' => 'iso-8859-1' ); $this->load->library('email', $config); $this->email->set_newline("\r\n"); $this->email->from('[email protected]', 'xyz'); $this->email->to('[email protected]'); $this->email->subject('Yadyaydayayayyayaada'); $this->email->message('ayyaydyadydydyaydaydyaydyaydya'); if($this->email->send()){ echo 'Your email is sent, foo!'; }else{ show_error($this->email->print_debugger()); } } } I googled for a solution for 4 hours, and all I could get is uncommenting the openssl line in php.ini (I don't even have that!), I manually added that one. But the codes above still gave me this error -> A PHP Error was encountered Severity: Warning Message: fsockopen() [function.fsockopen]: unable to connect to ssl://smtp.googlemail.com:443 (A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. ) Filename: libraries/Email.php Line Number: 1689 If anyone can help me here, I would be really really thankful. Thanks ![]()
[eluser]gRoberts[/eluser]
It's highly likely that your server does not have OpenSSL or an implementation of SSL installed, so it's unable to create an SSL connection to GMail's servers.
[eluser]CroNiX[/eluser]
@gRoberts PHP will produce an error stating that SSL was not enabled on the server if that was the case. GMail had a pretty wide service outtage yesterday. That could be your problem. http://www.engadget.com/2012/04/17/gmail-outage/ |
Welcome Guest, Not a member yet? Register Sign In |