this is my controller i am very new to codeigniter.
--------------------------------------------------------
public function joinus()
{
if($this->input->post('submit'))
{
$this->load->library('email');
$to=$this->admin_model->get_goinmail();
$from='';
$subject='';
$message='';
$config['mailtype'] = 'html';
$config['protocol'] = 'sendmail';
$this->email->initialize($config);
$this->email->set_newline("\r\n");
$this->email->from($from);
$this->email->to(@$to);
$this->email->subject(@$subject);
$this->email->message(@$message);
if($this->email->send())
{
$data['mail_status']="sucess";
}else{
$data['mail_status']="Un sucess";
}
}
$data['get_goinmail']=$this->admin_model->get_goinmail();
$data['content'] = $this->load->view($this->view_dir .'joinus',$data,TRUE);
$this->load->view('template',$data);
}
i want to send mail to list of members.
---------------------------------------------------------------
---------------------------------------------------------------
hear iam getting this error
Severity: Warning
Message: preg_match() expects parameter 2 to be string, array given
Filename: libraries/Email.php
Line Number: 795
A PHP Error was encountered
Severity: Notice
Message: Array to string conversion
Filename: libraries/Email.php
Line Number: 272
--------------------------------------
--------------------------------------
A PHP Error was encountered
Severity: Notice
Message: Array to string conversion
Filename: libraries/Email.php
Line Number: 272
A PHP Error was encountered
Severity: Notice
Message: Array to string conversion
Filename: libraries/Email.php
Line Number: 282
A PHP Error was encountered
Severity: Notice
Message: Array to string conversion
Filename: libraries/Email.php
Line Number: 282
thanks in advance...
meda shiva 0 Newbie Poster
cereal 1,524 Nearly a Senior Poster Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.