Welcome Guest, Not a member yet? Register   Sign In
POP3/SMTP library, converted from fMailbox (Flourish framework)
#1

[eluser]steelaz[/eluser]
I tried to run fMailbox class stand-alone and it worked quite well, so I decided to use it on my CodeIgniter application. I had to change how this class is initiated to use it as regular CodeIgniter library. Also in some places I had to replace Flourish exceptions with CodeIgniter’s error handling.

So, this is how you initiate library with just required parameters:

Code:
$config['type'] = 'imap';
$config['host'] = 'mail.example.com';
$config['username'] = '[email protected]';
$config['password'] = 'letsplay';

$this->load->library('mailbox', $config);

More options are available:

Code:
$config['type'] = 'imap';
$config['host'] = 'mail.example.com';
$config['username'] = '[email protected]';
$config['password'] = 'letsplay';
$config['port'] = 993;
$config['secure'] = TRUE;
$config['timeout'] = 5;

$this->load->library('mailbox', $config);

And this is how you call methods:
Code:
$messages = $this->mailbox->listMessages(10);

So it works basically as documented here, but you have to pass initial arguments as array. Hope someone will find it useful.

Installation: extract and copy Mailbox.php to your "libraries" directory.

Original documentation: http://flourishlib.com/docs/fMailbox

Download: http://www.arnas.net/blog/wp-content/plu...odeIgniter


Messages In This Thread
POP3/SMTP library, converted from fMailbox (Flourish framework) - by El Forum - 05-07-2010, 04:20 PM



Theme © iAndrew 2016 - Forum software by © MyBB