CodeIgniter Forums

Full Version: Receiving IMAP & POP3
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
What is the suggested or best way to handle this in CI?  I have read several posts on the net and stack overflow but can't get a good feel for what is the best.  Also is there a potential that receiving mail will be integrated into email class & helper?

The imap class listed here does not seem valid any longer
https://github.com/bcit-ci/CodeIgniter/wiki/IMAP
Ok so i could not find any good guidance on this so I created a new class based on some online resources to pull IMAP emails(credit given in the file).  This class will extend the base email class in CI.  I have attached the MY_Email class as well as the other two classes that are needed, maybe someone else can use them.

You will need to setup the email.php config file with these options.  There are more features that need to be added but this gets me started.

Code:
$config['imap_host'] = 'xxx.xxx.xxx.xxx';
$config['imap_user'] = 'user@domain.com';
$config['imap_pass'] = 'Jk98S**Jlk';
$config['imap_port'] = '143';
$config['imap_mailbox'] = 'INBOX';
$config['imap_path'] = '';
$config['imap_server_encoding'] = 'utf-8';
$config['imap_attachemnt_dir'] = './tmp/';
Had some issues with the class.  Updated them and they are attached.

Thanks
Decided to put this into Git.

https://github.com/iwatllc/CI_Imap.git
(02-07-2015, 01:38 PM)rfulcher Wrote: [ -> ]Decided to put this into Git.

https://github.com/iwatllc/CI_Imap.git

Great! was looking for something similar.
Thanks!
(02-07-2015, 01:38 PM)rfulcher Wrote: [ -> ]Decided to put this into Git.

https://github.com/iwatllc/CI_Imap.git

i manage to receive email but when the email has attachment i got this error  "Message: file_put_contents(./tmp/14_f_jx3d35240_icon2.png): failed to open stream: No such file or directory
Filename: libraries/MY_Email.php
Line Number: 359"

"$imap_attachemnt_dir    = "./tmp/""