There is no native mapping of db table to email, so you have to first select, then retrieve then send
$query = $this->db->query("SELECT emailAddress from table"); //select email addresses
$sendTo=array();
foreach ($query->result() as $row) //loop to build array
{
$sendTo[]=$row->emailAddress; //add to array
}
$this->email->to($sendTo);//send email
Of course I have had to guess you tables email field. The other(better?) option would be to put the send in to the loop, so you send to each email address separately.
5
solved Codeigniter – Using codeigniter email library, how do i send the email to a database list?