• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
imap_pop , array problem .


I am using the imap_pop lib and using the example from the wiki and made a small modify

// this is your pop server host and domain name
// you may have to look up the imap functions at PHP.net
// to get the right set of service flags here
$config['service_flags'] = '/pop3/notls';
$config['mailbox']= 'INBOX';
$msg_count = $this->imap_pop->connect_and_count($config);
$em = $this->imap_pop->grab_email_as_array(1);
$this->load->view('email_view', $em);

email_view.php :




Error code :
A PHP Error was encountered

Severity: Notice

Message: Undefined variable: text

Filename: views/email_view.php

Line Number: 5

I trying to get the messasage text from the mail from the array but no luck .

Hi nebi,

Had a quick look at this for you and if you change your view file to this:



You should see the massage text from your e-mail. You just miss read the array and referenced it wrong, easily done.

Thanks acoda , it works great!

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.