Skip to content

Zend Library #3

Description

@crg821

Want to send barcodes to a list of emails but when passing $this->set_barcode($temp) to the view, the view won't load the barcode. I wonder if Zend_Barcode or the Zend library is not orking is not working with CI 2.x.
MY CONTROLLER
public function SendEmail($results){
foreach ($results->result() as $row)
{
$this->email->clear(TRUE);
$temp = rand(10000, 99999);
$email = $row->email_test;
$fname = $row->fname_test;
$bar_code = $this->set_barcode($temp);
$email_data = [];
$email_data = array('fname'=> $fname, 'email'=> $email, 'bar_code'=> $bar_code);
$message = $this->load->view('pages/email_format', $email_data, TRUE);
$this->email->to($email_data['email']);
$this->email->from("crg@mydomain.com", "Some Person");
$this->email->subject("My Subject");
$this->email->message($message);
$send = $this->email->send();
}
}
MY VIEW
<?php echo $bar_code ?>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions