Create a file system/application/config/email.php with your ISP's SMTP server address:
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
$config['protocol'] = 'smtp';
$config['smtp_host'] = 'shawmail.vc.shawcable.net';
?>
It requires some specific initialization code:
$config = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.googlemail.com',
'smtp_port' => 465,
'smtp_user' => 'gmail.login@googlemail.com',
'smtp_pass' => 'your_password',
);
$this->load->library('email', $config);
$this->email->set_newline("\r\n");
More details: Gmail SMTP using SSL/TLS
Feedback
hello, are you use dokuwiki to power this site?
Minh
November 19, 2009
#1
dfgsdfg
sdfg
April 5, 2010
#2
zxzzX
ZXhdfuj qyyeq nkluewio dflj
February 17, 2011
#3
xvxcvxcv
xcvxv
February 25, 2011
#4
koiiiii
poiiiiiiiiii
February 25, 2011
#5
gatel
gatel
March 17, 2011
#6
this is a lovely, elegant explanation. thank you. :-)
Jawad
April 11, 2011
#7
rdykt
rtjkjk
May 3, 2011
#8
surim
surim
May 13, 2011
#9
help me :
<?php
class Email extends CI_Controller{
function __construct(){
parent::__construct();
}
function index(){
$config = Array(
'protocol' => 'smtp',
'smtp_host' => 'ssl://smtp.googlemail.com',
'smtp_port' => 465,
'smtp_user' => 'Iskandar7733@gmail.com',
'smtp_pass' => 'pass',
'mailtype' => 'html',
'charset' => 'utf-8',
'wordwrap' => TRUE
);
$this->load->library('email');
$this->email->initialize($config);
$this->email->set_newline("\r\n");
$this->email->from('Iskandar7733@gmail.com','Iskandar');
$this->email->to('sam.muhammadali@gmail.com');
$this->email->subject('This is an email test');
$this->email->message('It is working. Great');
if($this->email->send()){
echo "Your email was sent. fool.";
}else{
show_error($this->email->print_debugger());
}
}
}
?>
Iskandar Iskandar_7733@mail.ru
April 3, 2012
#10