[b]IMAP functionality in CodeIgniter[/b]
The point of this article is to develop some kind of IMAP functionality to CI, to connect to a mail server through IMAP, POP3 or NNTP.
Also to make a Class with the most used functions in building a webmail service.
/* Class: Mail */
[code]
<?php
class Mail extends Controller { // IMAP/POP3 (mail server) LOGIN var $imap_server = 'mail.example.org'; var $imap_user = 'user@example.org'; var $imap_pass = 'password'; // Constuctor function __construct() { parent::Controller(); $this->load->library('Imap'); } // index function index() { $inbox = $this->imap->cimap_open($this->imap_server, 'INBOX', $this->imap_user, $this->imap_pass) or die(imap_last_error()); $data_array['totalmsg'] = $this->imap->cimap_num_msg($inbox); $data_array['quota'] = $this->imap->cimap_get_quota($inbox); $this->load->view('intranett/mail_view', $data_array); } }
?> [/code]
There was an error while loading. Please reload this page.