Welcome Guest, Not a member yet? Register   Sign In
error sending mail in host
#1

[eluser]duy31187[/eluser]
function test(){
$config = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.googlemail.com',
'smtp_port' => 465,
'smtp_user' => '[email protected]',
'smtp_pass' => 'password',
'mailtype' => 'html',
'charset' => 'iso-8859-1'
);
$this->load->library('email', $config);
$this->email->set_newline("\r\n");




$this->email->from('[email protected]', 'Me');
$this->email->reply_to('[email protected]', 'Me');
$this->email->to('duy31187@yahoo.com');
$this->email->subject('testing my mail function with CodeIgniter');
$this->email->message('<html><body>this is the content</body></html>');

if ( ! $this->email->send()){
echo 'error! <br />';
echo $this->email->print_debugger();
// Generate error
}else{
echo "send mail successfully";
}

}
this code when I run it in localhost,i work well but when i put it in host megabyet it generate error:fsockopen() [function.fsockopen]: unable to connect to ssl://smtp.googlemail.com:465 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?).can anyone help me ? I have tried with port:587 but it's also error
#2

[eluser]duy31187[/eluser]
no one answer my question. I think maybe I'm using free hosting so it not supply smtp mail.maybe.
#3

[eluser]InsiteFX[/eluser]
Maybe because you posted in the wrong forum topic and did not read the fast reply on use code tags to post!

This forum topic is for user supplied code libraries and nothing else!

Please post your question in the correct forum topic.

Also if you did a forum search on email you would have found your answer!

InsiteFX




Theme © iAndrew 2016 - Forum software by © MyBB