Silverstripe IMAP class for extending imap functions
Simply copy the master folder to the base directory of your Silverstripe install, rename it to something appropriate, such as ss_imap, and perform a /dev/build/?flush=all.
Extend the SS_IMAP class with class of your own, and add or extend functions to take advantage of the native imap functions.
<?php
class EmailScanner extends SS_IMAP
{
public $db = array(
'Username' => 'Varchar(255)',
'Password' => 'Varchar(255)',
'Server' => 'Varchar(255)'
);
public function connect()
{
$this->imap = $this->open('{'.$this->Server.'}',$this->Username,$this->Password);
}
}