04-26-2010, 02:47 AM
[eluser]miss_amylee[/eluser]
hi all,
im using almost similar code but mine is not working.. im testing it on my real server.here is my code:
<?php
class Test2 extends Controller{
function __construct()
{
parent::Controller();
}
function index()
{
$data['pagetitle'] = 'Account Activation';
$email = $this->load->view('test1',$data,TRUE);
$config = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.googlemail.com',
'smtp_port' => 465,
'smtp_user' => '[email protected]',
'smtp_pass' => 'mypasswordhere',
'mailtype' => 'html',
'wordwrap' => TRUE
);
$this->load->library('email', $config);
$this->email->set_newline("\r\n");
$this->email->from('[email protected]', 'farah');
$this->email->to('[email protected]');
$this->email->subject(' Testing testing testing....');
#$this->email->message('Welcome!');
$this->email->message($email);
if (!$this->email->send()):
show_error($this->email->print_debugger());
else:
echo 'Your e-mail has been sent!';
endif;
}
}
?>
i already set my pop3 setting in gmail.but stl got the error.pls someone help me~
fsockopen() [function.fsockopen]: unable to connect to smtp.googlemail.com:465 (Connection timed out)
hi all,
im using almost similar code but mine is not working.. im testing it on my real server.here is my code:
<?php
class Test2 extends Controller{
function __construct()
{
parent::Controller();
}
function index()
{
$data['pagetitle'] = 'Account Activation';
$email = $this->load->view('test1',$data,TRUE);
$config = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.googlemail.com',
'smtp_port' => 465,
'smtp_user' => '[email protected]',
'smtp_pass' => 'mypasswordhere',
'mailtype' => 'html',
'wordwrap' => TRUE
);
$this->load->library('email', $config);
$this->email->set_newline("\r\n");
$this->email->from('[email protected]', 'farah');
$this->email->to('[email protected]');
$this->email->subject(' Testing testing testing....');
#$this->email->message('Welcome!');
$this->email->message($email);
if (!$this->email->send()):
show_error($this->email->print_debugger());
else:
echo 'Your e-mail has been sent!';
endif;
}
}
?>
i already set my pop3 setting in gmail.but stl got the error.pls someone help me~
fsockopen() [function.fsockopen]: unable to connect to smtp.googlemail.com:465 (Connection timed out)